-   Programming (
-   -   Having trouble using libwnck in my program. (

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>
#include <libwnck/screen.h>
#include <libwnck/window.h>
#include <libwnck/workspace.h>

int main()
WnckScreen *Screen;
Screen = wnck_screen_get_default();

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.