- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page