Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
7782 Discussions

building a shared object with -static-intel


Any gotchas or tips on how to build a shared object library that has no dynamic library dependencies beyond just openmp?

In other words, I want to use both the -shared and -static-intel flags when making this library.

While it seems to work, and ldd shows that the produced .so should not try to link against etc., it still tries to at runtime... I recall reading somewhere that one should not mix -shared and -static-intel. If so, is there a workaround? It would be quite useful to be able to ship a shared object with as few as possible external dependencies...

0 Kudos
1 Reply
Hi again,

It seems using the -shared and -static-intel flags works, so I think this issue can be closed.

However I am a bit worried about the statement in the release notes for the Intel C++ compiler 11.0 where it explicitly says that the "-shared" and "-static-intel" flags are mutually exclusive. I am kind of assuming that this was a temporary bug in the 11.0 version of the compiler, and that this is no longer an issue (I am using v12 - e.g. the new Composer XE compiler).