Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
30 Views

Error LNK2019 external symbol system@8_

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
Highlighted
Valued Contributor III
30 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,

0 Kudos
Highlighted
Black Belt Retired Employee
30 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.

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos