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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -