This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Environment variables....



>>>>> "Louis" == Louis Marascio <lmarasci@stevens-tech.edu> writes:

    Louis> Well, the test program that I ran was indeed flawed.  I
    Louis> have now confirmed that setting CPLUS_INCLUDE_PATH does
    Louis> work.  I also successfully compiled the test program with
    Louis> two directories.  However, I am still in the dark as to why
    Louis> my project is failing.  Just to make sure I'm going to go
    Louis> check for mispellings again for the 100th time.  Thanks
    Louis> again for all the support.

Be careful that you don't do this in your Makefile:

CPLUS_INCLUDE_PATH = <blah>

foo.o: foo.cc
       export CPLUS_INCLUDE_PATH
       g++ -c foo.cc

This will not export CPLUS_INCLUDE_PATH for g++, as make runs each
line in a separate shell.

Instead, you should say:

  export CPLUS_INCLUDE_PATH; g++ -c foo.cc

or

  env CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH} g++ -c foo.cc

or some equivalent construct.  

    Louis> - - - - - Louis R. Marascio A.K.A Louis Armistead and Jim
    Louis> McCraken Email: lmarasci@stevens-tech.edu "We have plenty
    Louis> of psychological abuse ICQ: 4270107 in stock" -- Ripped
    Louis> from jsm

-- 
Mark Mitchell		mmitchell@usa.net
Stanford University	http://www.stanford.edu



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]