Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

Reproducing -norunpath option

camilogonzalez
Beginner
124 Views
Hi there.

I am working with shared libraries (*.so files) recently migrated from Solaris to Linux.

In Solaris environment, we used Sun C++ compiler and our makefiles included -norunpath option.
In this way, we could use libraries in every environment regardless of path.

Does anybody know how to reproduce this option with Intel C++ compiler?

I have read the icc help but haven't found any similar option.

Thank you in advance.

Best regards.
Camilo.
0 Kudos
1 Reply
Kevin_D_Intel
Employee
124 Views
This is a feature of the linker, not the compiler. There's no Linux equivalent to this because the default GNU linker (ld) behavior is to not embed library paths into the executable which is what the -norunpath option does for you on Solaris. The GNU linker option to embed paths is -rpath. You can simply remove the -norunpath option for your Linux build.

This Solaris to Linux Porting guide from HP might be useful.
Reply