I have set my environment variable CPLUS_INCLUDE_PATH
to boost
.
>echo $CPLUS_INCLUDE_PATH
boost
But it doesn't work at all.
>g++ parse_utils.cpp
parse_utils.cpp:1:34: fatal error: boost/lexical_cast.hpp: No such file or directory
The .hpp
is in that path.
>g++ parse_utils.cpp -Iboost
(work well)
I thought CPLUS_INCLUDE_PATH
is equivalent to -I
option?
>g++ --version
g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
You need to export the variable before running g++:
export CPLUS_INCLUDE_PATH
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With