How can I build glib at c++ - compile error when build .cpp -
all
when build cpp using g++ , glib, meet compile error. c , gcc version ok. i'm building @ ubuntu 10.xx. built @ windows - c++.
how can build glib @ c++? you.
#include <glib.h> int main() { g_printf("test"); return 0; } jongwon_kwak@kwak-com:~/worksapce_cxx/testglib/src$ g++ -c -i/usr/include/glib-2.0 -i/usr/lib/i386-linux-gnu/glib-2.0/include testglib.cpp testglib.cpp: in function ‘int main()’: testglib.cpp:12:17: error: ‘g_printf’ not declared in scope
you missing #include <glib/gprintf.h>
Comments
Post a Comment