How to get a compile to see some include files ( advice needed )
![](https://seccdn.libravatar.org/avatar/b50a114fa525b8dd8d8a201834e4e5d4.jpg?s=120&d=mm&r=g)
I'm trying to compile some source which uses libxmls I've done make -f Makefile.cvs ./configure make I get .. ..g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../libwine -I../../../client/librapi -U__WCHAR_TYPE__ -D__WCHAR_TYPE__=short\ unsigned\ int -DUNICODE -O2 -fno-exceptions -fno-check-new -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long -Wnon-virtual-dtor -fno-builtin -O2 -march=i686 -c DBBackup.cpp *Initialization*:1: warning: `__WCHAR_TYPE__' redefined DBBackup.cpp:10: libxml/tree.h: No such file or directory make[5]: *** [DBBackup.o] Error 1 make[5]: Leaving directory `/home/diddy/download/ce/synce/client/tools/DBBackup' I'm not a linux programmer, so I'm not sure how to solve this. If I look for libxml/tree.h, I can find it in. /usr/local/include/libxml2/libxml/tree.h How can I tell the compiler to include this directory ? dids
![](https://seccdn.libravatar.org/avatar/16e8fa05c028e0652f4446662a70c00d.jpg?s=120&d=mm&r=g)
El Mar 06 Nov 2001 21:41, dids escribió:
I'm trying to compile some source which uses libxmls
I've done make -f Makefile.cvs ./configure make
I get ..
..g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../libwine -I../../../client/librapi -U__WCHAR_TYPE__ -D__WCHAR_TYPE__=short\ unsigned\ int -DUNICODE -O2 -fno-exceptions -fno-check-new -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long -Wnon-virtual-dtor -fno-builtin -O2 -march=i686 -c DBBackup.cpp *Initialization*:1: warning: `__WCHAR_TYPE__' redefined DBBackup.cpp:10: libxml/tree.h: No such file or directory make[5]: *** [DBBackup.o] Error 1 make[5]: Leaving directory `/home/diddy/download/ce/synce/client/tools/DBBackup'
I'm not a linux programmer, so I'm not sure how to solve this. If I look for libxml/tree.h, I can find it in. /usr/local/include/libxml2/libxml/tree.h
How can I tell the compiler to include this directory ?
dids
The argument that tells g++ (the C++ compiler) where to look for include files is -I. As you can se, you have a lot of them. The param needed is: -I/usr/local/include/libxml2 But maybe you can force configure to add this path. Try configure --help and look for an option --with-libxml-includes or something like that. HTH.
![](https://seccdn.libravatar.org/avatar/b50a114fa525b8dd8d8a201834e4e5d4.jpg?s=120&d=mm&r=g)
Thanks, thats what I thought, but wasnt sure. I tried checking for --with-libxml-include but no luck there. At least I know I'm doing the right thing. thanks dids
How can I tell the compiler to include this directory ?
dids
The argument that tells g++ (the C++ compiler) where to look for include files is -I. As you can se, you have a lot of them. The param needed is:
-I/usr/local/include/libxml2
But maybe you can force configure to add this path. Try configure --help and look for an option --with-libxml-includes or something like that.
HTH.
participants (2)
-
dids
-
Julián Rodríguez Bajo