Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner

include compiler's library automatically

I need to compile a dynamic library *.so. However, when I release it to others it complains missing some compiler related libraries such as libifcore.so.5 etc. Which flag I should use to have those needed libraries included automatically. Currently I have 

ifort -shared -g -heap-arrays  $(OBJS) -o  mylibrary.so

Thanks a lot!

0 Kudos
4 Replies
Highlighted
Black Belt

-static-intel links to the

-static-intel links to the Intel static libraries. -static links all libraries statically, including gcc.

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
Beginner

Thanks a lot. How about for

Thanks a lot. How about for Windows? 

0 Kudos
Highlighted
Beginner

I just found out for windows

I just found out for windows -static works, but not -static-intel

0 Kudos
Highlighted
Black Belt

For Windows, you want /MT  

For Windows, you want /MT or /libs:static

 

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos