The question is in the context of the following question: Why are libraries not found, even though they are clearly on the -L path? . It seems that my libraries and my object file have a different ELF format, which might cause the linker to not "find" the libraries.
Now, this leads to a couple of questions:
It seems that my compiler normally generates SYSV ELF files. (Checked with
file
). However, for that particular C++ source, it generates a Linux/GNU ELF object file. I wonder why, so I reduced that source to an empty main method - and suddenly I get a SYSV object file. What inside a C++ source file can cause the compiler to switch the ELF format?Is it true or false that I can not link Linux/GNU together with SYSV ELF?
Is there an option to force the compiler to create a certain ELF format?
I'm working with a Cray g++ (GCC) 5.3.0 20151204.