Chris Espinosa wrote:
Then when you're done with that you can look at your -I flags (include search paths) and figure out why you're telling gcc to look in /usr/bin for headers, when it never, ever should.
OK, /usr/bin *is* in my CPATH, but I have no idea why. Here's my .bash_profile:
# Setting PATH for MacPython 2.5
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"
PATH="/usr/local/bin:${PATH}"
CPATH="/usr/local/lib/wx/include/mac-unicode-release-static-2.8:${PATH}"
CPATH="/usr/local/include/wx-2.8:${CPATH}"
CPATH="/usr/local/include/vtk-5.0:${CPATH}"
export PATH
export CPATH
Here's my full g++ command:
g++ -I/usr/local/lib/wx/include/mac-unicode-debug-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXDEBUG__ -D__WXMAC__ -I../../code/wxCats/ test_CatsDataIO.cpp ../../code/wxCats/CatsDataIO.cpp
As you can see, I'm nowhere explicitly adding /usr/bin to my effective CPATH.