- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What's happening is that, for the command that creates the executable, it isn't referencing the Intel Fortran run-time libraries. I gather that CCLD invokes the C compiler to run ld, and it doesn't know how to find the Fortran libraries.I think that if you had CCLD run ifort instead for this step it would work. There are probably other ways to solve it, and I assume others will suggest them (Linux not being my strong point.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We also use the C compiler as linker for our main library which is Fortran code to make it besser accessible from external programs. For gcc/gfortran this works as gcc automatically links in all run-time libraries necessary. For ifort this doesn't work. We get access to the runtime libraries using the AC_FC_LIBRARY_LDFLAGS command from autotools during our configure process, store these in the FCLIBS variable and use them during linking.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry but I do not know how to use your advice, this is my configure:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
E.g., on MAC OS X we get the flags from our configure script, and those flags are then stored in the environment variable
FCLIBS = '-L/opt/intel/compilers_and_libraries_2019.0.070/mac/compiler/lib -L/usr/lib -lifportmt -lifcoremt -limf -lsvml -lipgo -lintlc -lpthread'
When we build our library, we add $(FCLIBS) in the link command according to
lib<your_project_name>_la_LIBADD += $(FCLIBS)
Note that this is autotools-specific, for cmake you need to add this to the linker flags, which would be something like
-DCMAKE_EXE_LINKER_FLAGS = '-L/ .... ' or something similar, I am not really familiar with cmake.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Juergen, thanks at all.
I have solved getting FCLIBS from the Makefile and doing, after configure:
make LDFLAGS="fclibs contents"
Regards

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page