Search code examples
fortranlinker-errorsintelintel-fortran

Intel compiler undefined reference to symbol 'for_inquire'


I'm running a Makefile given to me to compile some Fortran code along with some C++ code. This is being compiled on CentOS using the intel compiler.I didn't write any of the code or the Makefile, also I have no clue what I'm doing.

When I run the Makefile script I get the following error when trying to do something with Fortran code 'libStuff':

ld: /home/myProject/trunk/libStuff/lib/libStuff.a(stuff.o): undefined reference to symbol 'for_inquire'
/opt/intel2019/compilers_and_libraries_2019.0.117/linux/compiler/lib/intel64_lin/libifcore.so.5: error adding symbols: DSO missing from command line
make[1]: *** [myProject] Error 1

I've played around with the Makefile and I've figured out that I need to add a flag to a specific line

MYFORTRANCODE=-L$(MYFORTRANCODE_LIB) -lSTUFF -lmpi_usempif08 -lmpi_mpifh  -l_I_NEED_TO_ADD_SOMETHING_HERE

The problem is I don't know which flag to add, and couldn't find any helpful documentation on the intel website. Also I couldn't figure out what the 'for_inquire' thing means.

Anybody got any ideas?


Solution

  • the flag I needed to add was -lifcore. I figured it out.