Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Intel Customer Support will be observing the Martin Luther King holiday on Monday, Jan. 17, and will return on Tues. Jan. 18.
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646
26850 Discussions

How to connect ifort to a 'gfortran' lib

Peng__Jerry
Beginner
110 Views

Hi:

   sorry for the disturbing.

   Now I compile all my ocean model with the help of ifort, but I also need to use the NCL static lib which compiled by gfortran. it always said that "undefined reference to MAIN__"

   What should I do now? Thanks for your help.

Best Regards

0 Kudos
2 Replies
Juergen_R_R
Valued Contributor I
110 Views

This usually means that you compile a module as if it were a main program. Without code and compile or link command nothing else to add.

Steve_Lionel
Black Belt Retired Employee
110 Views

You can't do this - it won't work. In general, you must recompile all sources using a single Fortran compiler. Objects and libraries from one Fortran compiler don't work with those from another.

Reply