I have a custom build cmake v3.10.0 which was compiled with a gcc_4.8.3
. I am using this custom build cmake to compile a cmake project that must use gcc _4.1.2
because of legacy code.
Executing cmake promted me with an error because it needs to use the libstdc++-IFX.so.6
provided by gcc_4.8.3
which I fixed by adding the path to the correct library in my LD_LIBRARY_PATH
before the path to the libraries provided by gcc_4.1.2
.
Compiling my project and linking an executable (which is done by c++) results in the linker taking the gcc_4.8.3
stdlibs over the gcc_4.1.2
libs. Is there any way to tell cmake to not use the libraries it needs for himself for my cmake project preferably without touching LD_LIBRARY_PATH
?
Edits:
@squareskittles comment: I did read and try everything this post suggest but without any changes. The libstdc++-IFX.so.6
is still taken from gcc_4.8.3