On Sat, 24 Mar 2007 10:22:31 +0100
"Verdi March"
Hi,
Is it safe to link an application against libraries compiled with a different compiler? For example, to compile Linpack using gcc, and then to link with static libraries (libacml_mp.a and libmpich.a) compiled with PGI.
My presumption is that it is safe to do so, since objects/libraries in Linux (SLES9) must follow a certain format (ELF?). But with my shallow knowledge in compilers, it's better to ask to this list. In general, yes you can. Many times companies send libraries compiled with a different compiler. There are caveats, of course. The main thing is that the libraries you link against have the same APIs that are included in the associated header files. You've also got to be careful about is system calls and api changes between libraries. -- Jerry Feldman
Boston Linux and Unix user group http://www.blu.org PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9