On Mon, 19 Nov 2007 15:28:13 +0100, Stefan Kristensen wrote: >>>> Most likely /usr/local/include will be on the include path for your >>>> g++ by default, so: >>> It is. >> >> ... so how did you know that? > > When booting my FreeBSD box, I saw that path and the words "include > path" and "g++", so it was a guess. And a faulty one, my appologies. > > >>> I'm just a little curious why I have to use the -I option when the >>> files are in a standard path? >> >> You shouldn't have to. Perhaps you could post your *exact* compile >> command, without -I options, but with -v, and the *complete* output. > > g++ -o test1 test1.cpp -L/usr/local/lib/mysql/ -lmysql -v > > Using built-in specs. > Configured with: FreeBSD/i386 system compiler Thread model: posix > gcc version 3.4.6 [FreeBSD] 20060305 > /usr/libexec/cc1plus -quiet -v -D_LONGLONG test1.cpp -quiet -dumpbase > test1.cpp -auxbase test1 -version -o /var/tmp//ccdyq51U.s ignoring > duplicate directory "/usr/include" #include "..." search starts here: > #include <...> search starts here: > /usr/include/c++/3.4 > /usr/include/c++/3.4/backward > /usr/include > End of search list.
[...] > Which explains a lot. But I'm pretty sure I get a message when I boot > the FreeBSD box about the /usr/local/include path. But it is in the > white text, so I can't see it using dmesg. (Hope that makes sense, I'm > still pretty new on FreeBSD as well). > > So I beleive I have the answer for the mystery. Thank you very much for > your patience :-) No problem. Does seem a bit odd to me that /usr/local/include is not in the default search path, but then I'm not very familiar with FreeBSD. Maybe that's the "standard" GCC configuration for the OS? You could try asking on a FreeBSD forum. Cheers, -- Lionel B _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus