Can't compile wxWidgets on unbuntu

Hello,
I am trying to compile wxWidgets on Ubuntu but when I run 'conifigure' it tells that GTK is not installed. When I tried to compile a test program I got an error
main.c:1:21: fatal error: gtk/gtk.h: No such file or directory

Later I figured out that I need to invoke pkg-config:
g++ gtk_test.c `pkg-config --cflags --libs gtk+-3.0`
and it compiled. However, this does not help me to compile wxWidgets.

So, my question is how do I configure gcc to compile gtk programs without using pkg-config?
I don't think wxWidgets supports gtk3 yet. So make sure the gtk+-2.0 development files are installed.
Thanks, I'll try that.
I have another problem: when try to run a program I get the following error:

~/Desktop/Partmod/bin# ./wxGUI
./wxGUI: error while loading shared libraries: libwx_gtk2_core-2.9.so.3: cannot open shared object file: No such file or directory

I know that libwx_gtk2_core-2.9.so.3 is in /usr/local/lib/ but how my program can't find it. However, everything is fine if I run the program from CodeBlocks..

EDIT: fixed, I just needed to set up LD_LIBRARY_PATH
Last edited on
Topic archived. No new replies allowed.