LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Having trouble using libwnck in my program. (https://www.linuxquestions.org/questions/programming-9/having-trouble-using-libwnck-in-my-program-319466/)

rob_of_ownsboro 05-02-2005 04:49 PM

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.

rob_of_ownsboro 05-03-2005 05:25 PM

Figured it out. I needed to init gtk first.


All times are GMT -5. The time now is 07:48 AM.