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

Link: error #10037: could not find 'link'

Elsayed_A_
Beginner
3,665 Views

Hello,

I am using MVS 2015 Community with Intel Parallel studio 2017. When I compiled my Fortran code, I got the following error.

Link: error #10037: could not find 'link'

I tried with the following simple code and I got the same error.

program testprog

    write(*,*) 'its working'
    
end program testprog
    

Could you please, explain how to fix this error?

Regards

0 Kudos
1 Solution
Kevin_D_Intel
Employee
3,665 Views

This article discusses further what others mentioned about installing VS 2015 Community installation with the required C++ support.

View solution in original post

0 Kudos
13 Replies
mecej4
Honored Contributor III
3,665 Views

The Microsoft C/C++ tools are either not installed or not properly configured. Try to open a MSVC command window and compile a C hello-world program there.

0 Kudos
TimP
Honored Contributor III
3,665 Views

commands such as CL or LINK should respond the same in both a VS and a psxe cmd window.  Be certain to select an X64 cmd window (or 32-bit window) same in both cases, according to your intentions.

As sham hinted, you must select C++ support in the VS install menu.  If you need to add it, you will then repeat the psxe installation (e.g. using the unpacked download).

0 Kudos
Kevin_D_Intel
Employee
3,666 Views

This article discusses further what others mentioned about installing VS 2015 Community installation with the required C++ support.

0 Kudos
Elsayed_A_
Beginner
3,665 Views

I installed the common tools for visual C++ 2015 component from visual studio. The problem is resolved. However, I got the following errors.

1>------ Build started: Project: OUGEL1D, Configuration: Debug Win32 ------
1>Compiling with Intel(R) Visual Fortran Compiler 17.0.2.187 [IA-32]...
1>INTEGRATION.f90
1>OUGEL1D.f90
1>Linking...
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>INPUTS.obj : error LNK2019: unresolved external symbol _FUNC1 referenced in function _INPUTS_mp_ROCKPROP
1>INPUTS.obj : error LNK2019: unresolved external symbol _SIMPSON referenced in function _INPUTS_mp_ROCKPROP
1>INPUTS.obj : error LNK2019: unresolved external symbol _FUNC2 referenced in function _INPUTS_mp_ROCKPROP
1>INTEGRATION.obj : error LNK2019: unresolved external symbol _PYTHAG referenced in function _INTEGRATION_mp_IMTQL2
1>QMOM.obj : error LNK2019: unresolved external symbol _STABILITY_RATIO referenced in function _QMOM_mp_KERNELS
1>XDLVO.obj : error LNK2019: unresolved external symbol _POTENTOT referenced in function _XDLVO_mp_STABILITY_RATIO
1>PHYSICS.obj : error LNK2019: unresolved external symbol _WHEELER referenced in function _PHYSICS_mp_SCONCNP
1>PHYSICS.obj : error LNK2019: unresolved external symbol _SHEAR_RATE referenced in function _PHYSICS_mp_SCONCNP
1>PHYSICS.obj : error LNK2019: unresolved external symbol _PECLET referenced in function _PHYSICS_mp_SVISCOS
1>Debug\OUGEL1D.exe : fatal error LNK1120: 9 unresolved externals

 

Could you please, explain how to fix these issues?

Regards

0 Kudos
Kevin_D_Intel
Employee
3,665 Views

All the errors are references to routines that were not found. Either you have not compiled all the needed source files for the small program you are building or the program requires another library that provides the identified routines. If you find the missing source file then add it to your Fortran project and re-try the build.

0 Kudos
mecej4
Honored Contributor III
3,665 Views

The names of the unresolved external symbols are probably the names of user subroutines and functions that are in a source file that should have been included in the compilation. The command output shows only two source file names. Do you have more source files, in which the missing subprogram names can be found?

The "'MSVCRT' conflicts" message indicates that inconsistent run-time library selections were specified when compiling the source files or the user libraries involved in the link step. Did you specify the /MD and /MT options, or the corresponding /libs:<xxx> options?

0 Kudos
Elsayed_A_
Beginner
3,665 Views

I was able to fix these errors by hooking some missed modules by USE Statements. Now, I am geeting this.

'OUGEL1D.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'OUGEL1D.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'OUGEL1D.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\kernel32.dll'
'OUGEL1D.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'OUGEL1D.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'OUGEL1D.exe' (Win32): Loaded 'C:\Windows\SysWOW64\apphelp.dll'. Cannot find or open the PDB file.
'OUGEL1D.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140d.dll'. Cannot find or open the PDB file.
'OUGEL1D.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbased.dll'. Cannot find or open the PDB file.
'OUGEL1D.exe' (Win32): Loaded 'C:\Program Files (x86)\Intel\Intel(R) Parallel Studio XE 2017\compilers_and_libraries_2017.2.187\windows\redist\ia32_win\compiler\libmmd.dll'. Symbols loaded.
'OUGEL1D.exe' (Win32): Loaded 'C:\Program Files (x86)\Intel\Intel(R) Parallel Studio XE 2017\compilers_and_libraries_2017.2.187\windows\redist\ia32_win\compiler\libifcoremd.dll'. Module was built without symbols.
'OUGEL1D.exe' (Win32): Loaded 'C:\Program Files (x86)\Intel\Intel(R) Parallel Studio XE 2017\compilers_and_libraries_2017.2.187\windows\redist\ia32_win\compiler\libifcoremdd.dll'. Module was built without symbols.
'OUGEL1D.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imagehlp.dll'. Cannot find or open the PDB file.
'OUGEL1D.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbase.dll'. Cannot find or open the PDB file.
The thread 0x59ec has exited with code 0 (0x0).
The thread 0x5bb4 has exited with code 0 (0x0).
The thread 0x2e5c has exited with code 0 (0x0).
The program '[16616] OUGEL1D.exe' has exited with code 0 (0x0).

Could you please, explain what is this?

Sorry for overwhelming you with my questions. I am still new to intel Fortran.

Regards

0 Kudos
Steve_Lionel
Honored Contributor III
3,665 Views

All of that says that your program exited with a normal (success) status.

The various "Loaded" messages are just informational and can be ignored.

Then you have three messages saying that threads exited with a zero status, which usually means normal termination. Last the program exited with zero status

0 Kudos
andrew_4619
Honored Contributor II
3,665 Views

All the PDB warnings relate to system libs for which you have no debug symbols. That is normal and not a problem you are not debugging the system libs! "The program '[16616] OUGEL1D.exe' has exited with code 0 (0x0).​" suggests your program ran and finished in some way. Do you have any breakpoints set in it for the debugger to stop at? Set a break point at the first line......

0 Kudos
Elsayed_A_
Beginner
3,665 Views

Thanks for your enlightened replies.

0 Kudos
Elsayed_A_
Beginner
3,665 Views

mecej4 wrote:

The "'MSVCRT' conflicts" message indicates that inconsistent run-time library selections were specified when compiling the source files or the user libraries involved in the link step. Did you specify the /MD and /MT options, or the corresponding /libs:<xxx> options?

mecej4, could you please, explain more? I am not familiar with these options.

Regards

0 Kudos
mecej4
Honored Contributor III
3,665 Views

The compiler manual is the place to look for that information. It is probably on your system or is accessible through https://software.intel.com/en-us/fortran-compilers-support/documentation .

0 Kudos
Elsayed_A_
Beginner
3,665 Views

mecej4

Thank you very much for your help. 

0 Kudos
Reply