How is CCFLAGS and CPPFLAGS used in command line?
When gcc compile cpp files that requires c++ runtime, we need to add a '-lstd=c++' link flag, or else there's compilation error.
I wish to know if I don't use g++, but to use some environment settings, can it be achieve? I tried CCFLAGS like this:
$ CCFLAGS=-lstdc++ gcc e.cpp
Well it doesn't work. I tried "CPPFLAGS", neither works. I used to specify these 2 flags in make files, but seems they don't work under command line as environment variables.
But what's the difference? When used in make files, these variables work, I suppose they're command line options passed to gcc, but why they don't work under shell?
If this should not work as environment variables, why they work inside scons, does scons convert them into gcc arguments automatically?