LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-02-2005, 03:49 PM   #1
rob_of_ownsboro
LQ Newbie
 
Registered: May 2005
Location: Owensboro KY
Distribution: RHEL 4
Posts: 4

Rep: Reputation: 0
Having trouble using libwnck in my program.


I am getting a segmentation fault when calling the linwnck API. I think i may not be linking my program properly and have not been able to find enough information on the WEB to figure it out myself.

Here is my program stripped down.

#include <glib.h>
#define WNCK_I_KNOW_THIS_IS_UNSTABLE 1
#include <libwnck/screen.h>
#include <libwnck/window.h>
#include <libwnck/workspace.h>

int main()
{
WnckScreen *Screen;
Screen = wnck_screen_get_default();
return(1);
}

This is how I am building my executable.
gcc workspace.c -o workspace.exe `pkg-config --cflags --libs libwnck-1.0`

I am a newbie to Linux so please don't assume I know anything. Thanks in advance.
 
Old 05-03-2005, 04:25 PM   #2
rob_of_ownsboro
LQ Newbie
 
Registered: May 2005
Location: Owensboro KY
Distribution: RHEL 4
Posts: 4

Original Poster
Rep: Reputation: 0
Figured it out. I needed to init gtk first.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
having trouble with the do while loop in program mshinska Programming 2 10-08-2005 10:18 PM
Trying to patch libwnck and create .deb tsalem Linux - Newbie 3 04-02-2005 07:44 PM
trouble configuring a program minm Linux - Newbie 12 03-28-2005 04:33 PM
Help locating and patching libwnck on Ubuntu Vetti Linux - Software 3 03-21-2005 12:57 AM
Trouble compiling QT program vapebait Programming 2 11-25-2003 02:23 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration