c++ - Unable to compile basic GLIB program after GLIB install -


I can not compile this basic program by using glib.h ...

 < Code> #include glib.h #include stdio.h int main () {return (glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; Return 0; }  

glib.h /usr/local/include/glib-2.0

, so I

  $ GCC-V-C-MCPU = V9 -i / USR / Local / Incorporated / Glib-02 Testimeter 2C  

Now let me configure the grid. But it is in /usr/local/lib/glib-2.0/include/glibconfig.h

; Strangely glibconfig.h is the file in the / usr / local /lib/glib-2.0/include directory and more odd this /usr/local/include/glib-2.0 directory

Here's some more error message ...

from /usr/local/include/glib-2.0/glib.h:32, testme.c : 40 :: 34: 24: from glibconfig.h: Not so file / directory

Here is an extract of /usr/local/include/glib-2.0/glib/gtypes.h

  ifndef __G_TYPES_H__ defined __G_TYPES_H__ contains Glibconfig.h included glib / gmacros.h G_BEGIN_DECLS typedef char gchar; Typingface short group;  

The question is how should GCC get glibconfig.h?

Glib installs a glib-2.0.pc file that is compiled and Describes all the options needed for the link.

 Export PKG_CONFIG_PATH = / usr / local / lib / pkgconfig g ++ - C 'pkg-config -cflags glib-2.0` testme2.cg ++ -o testme2 testme.o` pkg-config -libs Glib-2.0` 

Note use of pkg-config inside the backquotes.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -