- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
- Marcas:
- Intel® Fortran Compiler
Link copiado
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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.)
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Sorry but I do not know how to use your advice, this is my configure:
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Thanks Juergen, thanks at all.
I have solved getting FCLIBS from the Makefile and doing, after configure:
make LDFLAGS="fclibs contents"
Regards

- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora