Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26755 Discussions

Error LNK2019 external symbol system@8_

Andrade__Gabriel
Beginner
104 Views
Good afternoon. I am trying to run an EXE external file with the command RESULT = SYSTEM('programa.exe') but the code is returning the code: error LNK2019: unresolved external symbol _SYSTEM@8 referenced in function _MODELO Modelo.obj I looked up some solutions but I couldn't find anything usefull.
0 Kudos
2 Replies
andrew_4619
Honored Contributor I
104 Views

System is not standard Fortran but it is defined in the module IFPORT so add USE IFPORT to your source. Better still use EXECUTE_COMMAND_LINE  which is standard fortran,

Steve_Lionel
Black Belt Retired Employee
104 Views

The @8 indicates that you have asked the compiler to use the STDCALL calling convention, possibly as a result of migrating the application from Compaq Visual Fortran or using the /iface compiler option. Right click on the project, select Properties. Go to Fortran > External Procedures. Change Calling Convention to "Default" and String Length Argument Passing to "After all arguments".

I do agree with Andrew's recommendation of the standard intrinsic EXECUTE_COMMAND_LINE instead of SYSTEM.

Reply