Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

error LNK2019 fatal error LNK1120

Mahesh_K_
Beginner
514 Views

I used CALL SYSTEM("dir")

it gives these error messages. Please give me help. I'm using visual Studio and Fortran Compiler 11.

error LNK2019: unresolved external symbol _SYSTEM@8 referenced in function _RESIST

fatal error LNK1120: 1 unresolved externals

Thank you.

0 Kudos
3 Replies
Les_Neilson
Valued Contributor II
514 Views

System is a function so it used as follows:

    result = system("dir")

not "call"

Remember to  USE IFPORT at the beginning of the subprogram in which SYSTEM is used.

For more information see the help documentation.

Les

0 Kudos
TimP
Honored Contributor III
514 Views

Apparently, you have set /iface:cvf (as would happen in automatic conversion of a CVF project).  As Les said, USE IFPORT might help in flagging problems associated with that or using the non-standard system call syntax of some other compiler.

The Fortran standard version of this didn't become available until ifort 15.0.1.

0 Kudos
Mahesh_K_
Beginner
514 Views

Thank you. I corrected my mistake.

Thank you all for helping.

0 Kudos
Reply