This is the mail archive of the 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]
Other format: [Raw text]

Help needed with include path precedence order


I am using gcc 7.3.0 on Ubuntu 18.04 LTS to build an application that uses
the Boost libraries. I want to use  Boost 1.69, which I have installed on
another server. The Ubuntu machine has  Boost 1.65 installed.  I specify
the remote boost path (to 1.69) in my makefile and 'make' compiles my
source file with:

g++ -c -Wall -m64 -I/net/simdata/OpenSourceLibs/Boost/rel-1.69.0/ -fpic -O3
SINRCalculation.cpp -o _gnuRelease/SINRCalculation.o

Now, that source file uses boost/multi_array.hpp. The above compiler
command gives error:

In file included from /usr/include/boost/multi_array.hpp:30:0,

                 from SINRCalculation.cpp:25:

fatal error: boost/type_traits/is_nothrow_swappable.hpp: No such file or

 #include <boost/type_traits/is_nothrow_swappable.hpp>


compilation terminated.

Now, my copy of boost 1.69 does contain is_nothrow_swappable.hpp so, at
first sight, that error is surprising.

I think what is happening is the is_nothrow_swappable.hpp is being searched
for on the system library path (boost 1.65 does not have that file), not
the one I specified using -I.

Is this possible?  If so, how can I force the compiler to use the boost
1.69 path consistently for all paths?

Best regards


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