- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
コピーされたリンク
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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.)
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Sorry but I do not know how to use your advice, this is my configure:
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Thanks Juergen, thanks at all.
I have solved getting FCLIBS from the Makefile and doing, after configure:
make LDFLAGS="fclibs contents"
Regards
