You are not logged in.
Hi,
This is the code i'm trying to test (just a testcase. the actual code is more complex and a lot bigger and doesn't even open a window)
#include <gtk/gtk.h>
int
main (int argc, char **argv)
{
gtk_init (&argc, &argv);
GtkWidget *win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_widget_show_all (win);
gtk_main ();
return 0;
}
Now if i compile that code with this on the command line: g++ `pkg-config --cflags --libs gtk+-2.0` test.cpp -o test
It will compile just fine and will run just fine. But now the most annoying and frustrating thing is codeblocks.. that somehow manages to throw in the following errors:
test.cpp|6|undefined reference to `gtk_init'|
test.cpp|7|undefined reference to `gtk_window_new'|
test.cpp|8|undefined reference to `gtk_widget_show_all'|
test.cpp|9|undefined reference to `gtk_main'|
||=== Build finished: 4 errors, 0 warnings ===|
And in the build options i have:
(under all builds like debug and release)
Linker settings
'pkg-config gtk+-2.0 --libs --cflags'
O btw. this all used to work just fine in ubunto and the fact that it works fine when i manually compile it clearly tells me that:
- All packages are installed
- pkg-config is working
- codeblocks is not working
Any ideas where this could go wrong in codeblocks?
And any ideas how to fix it?
O btw. i have this undefined error with every single function that comes from a included file.
Offline
never mind this issue. this one is fixed.
Don't bother asking me why because i did a few things then it just worked.. one includes upgrading codeblocks to the latest revision with the aur codeblocks pkgbuild file.
Offline
Hello Markg85!
Great! You can sign the topic with 'Solved'!
Offline