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

Fortran Error Link Error 10037

Nebojsa_Cekic
Beginner
918 Views
Hello Community,

we have problems with linking a fortran object. We got the error below. Can you tell me what is my problem? Do i have to configure something? Our System is a Windows 7 Professional Workstation. Here is the Software installed on it:
Intel Visual Fortran Compiler for Windows 64bit
Visual Studio 2010 64bit

What we are doing is the following:
1. Start Fortran CMD 64bit -> All Programs -> Intel Software Deployment Tools -> Intel visual Fortran Compiler Professional 11.1.054 -> Fortran Build Environment for applications running on Intel 64 (x86)\\Intel\\Compiler\\11.1\\054\\bin\\ifortvars.bat" intel64"
2. Go to the directory with the *.obj File: c:\\tmp\\TESTS
3. type the following command: ifort stl_run
4. Her is the error:
ifort: error #10037: could not find link

- Same error with 32bit fortran and Matlab, too!
- In the directory C:\\Program Files (x86)\\Intel\\Compiler\\11.1\\054\\bin you can find a batch file named ifortvars. Here is it:
- the object file stl_run look like this:
program stl_run_dummy
! include 'tiscslibf.h'
real*8 zeit, waerme_eintrag_oel_in_zk
character*100 variableName
zeit = 1.0
waerme_eintrag_oel_in_zk = 100
variableName = 'waerme_eintrag_oel_in_zk'
write(*,*)'Zeit=',zeit,'waerme_eintrag_oel_in_zk=',waerme_eintrag_oel_in_zk, 'variable name 1' , variableName
! call tiscInitializeClient
! call tiscConnectClient
! call tiscSendDouble (variableName, waerme_eintrag_oel_in_zk)

end

- die tiscslibf.h looks like this:
#ifndef TISCSLIBF_H
#define TISCSLIBF_H

#include "tiscslibf_preprocessordefinitions.h"
#include
using std::string;
/*
#ifdef TISClibf_dll
#if defined(_WINDLL) && defined(__cplusplus)
#define TISCSlibf_EXPORT extern "C" __declspec(dllexport)
#elif defined(__cplusplus)
#define TISCSlibf_EXPORT extern "C"
#else
#define TISCSlibf_EXPORT
#endif
#else
#define TISCSlibf_EXPORT
#endif
*/

#define TISCSlibf_EXPORT __declspec(dllexport)
#define EXTERN extern "C"

TISCSlibf_EXPORT void libf_printconnection ();

TISCSlibf_EXPORT void libf_tiscInitializeClient ();
TISCSlibf_EXPORT void libf_tiscConfigureClient (char *const hostName, int* serverPort, char *const description, int* syncMethod);
TISCSlibf_EXPORT void libf_tiscConfigureSerialClient (char *const hostName, int* serverPort, char *const description, int* syncMethod, int* id);
// syncMethod: 0 = AlwaysPreparedToSync: Connection is always prepared to be synchronized. Best for pure receivers.
// 1 = PreparedToSyncOnAllDataNew: Connection is prepared to be synchronized when all it's data is newly written.
// 2 = PreparedToSyncOnSyncSignal: Connection is prepared to be synchronizedy when function "sendSyncSignal" has been called.

TISCSlibf_EXPORT void libf_tiscSetSyncRate(int syncRateMSec);

TISCSlibf_EXPORT int libf_tiscConnectClient ();
TISCSlibf_EXPORT void libf_tiscDisconnectClient ();
TISCSlibf_EXPORT int libf_tiscClientIsConnected ();

TISCSlibf_EXPORT int libf_tiscReceiveVariable (char *const variableName, char *const variableType);
TISCSlibf_EXPORT int libf_tiscReceiveVariableId (char *const variableName, char *const variableType, int *const variableId);

TISCSlibf_EXPORT int libf_tiscSendVariable (char *const variableName, char *const variableType);
TISCSlibf_EXPORT int libf_tiscSendVariableId (char *const variableName, char *const variableType, int *const variableId);

TISCSlibf_EXPORT int libf_tiscGetDouble (int *variableId, double *value);
TISCSlibf_EXPORT int libf_tiscGetDouble_Name (char *const variableName, double *value);
TISCSlibf_EXPORT int libf_tiscSendDouble (int *variableId, double *value);
TISCSlibf_EXPORT int libf_tiscSendDouble_Name (char *const variableName, double *value);

TISCSlibf_EXPORT int libf_tiscGetInteger (int *variableId, int *value);
TISCSlibf_EXPORT int libf_tiscGetInteger_Name (char *const variableName, int *value);
TISCSlibf_EXPORT int libf_tiscSendInteger (int *variableId, int value);
TISCSlibf_EXPORT int libf_tiscSendInteger_Name (char *const variableName, int *value);
/*
TISCSlibc_Export bool tiscGetString (int variableId, char *const value);
TISCSlibc_Export bool tiscGetString_Name (char *const variableName, char *const value);
TISCSlibc_Export bool tiscSendString (int variableId, char *const value);
TISCSlibc_Export bool tiscSendString_Name (char *const variableName, char *const value);

TISCSlibc_Export bool tiscGetDoubleVector (int variableId, double* *value, unsigned int &length);
TISCSlibc_Export bool tiscGetDoubleVector_Name (char *const variableName, double* *value, unsigned int &length);
TISCSlibc_Export bool tiscSendDoubleVector (int variableId, const double *const value, unsigned int length);
TISCSlibc_Export bool tiscSendDoubleVector_Name (char *const variableName, const double *const value, unsigned int length);

TISCSlibc_Export bool tiscGetIntegerVector (int variableId, int* value, unsigned int &length);
TISCSlibc_Export bool tiscGetIntegerVector_Name (char *const variableName, int *value, unsigned int &length);
TISCSlibc_Export bool tiscSendIntegerVector (int variableId, const int *const value, unsigned int length);
TISCSlibc_Export bool tiscSendIntegerVector_Name (char *const variableName, const int *const value, unsigned int length);
*/
TISCSlibf_EXPORT int libf_tiscSendSyncSignal ();
TISCSlibf_EXPORT int libf_tiscWaitForSyncSignal ();
TISCSlibf_EXPORT int libf_tiscWaitForSyncSignalTimeout (int* msecTimeout);

#include
using std::string;

#ifdef _WINDLL
#define EXTERNLICENSE __declspec(dllexport)
#else
#define EXTERNLICENSE
#endif

#ifdef __cplusplus
extern "C"{
#endif
EXTERNLICENSE void tiscLicensee (string &licensee);
EXTERNLICENSE int tiscLicenseExpired ();
EXTERNLICENSE void tiscLicenseExpirationDate (string &expiration);
EXTERNLICENSE void tiscProductName (string &productName);
EXTERNLICENSE void tiscVersion (string &version);
#ifdef __cplusplus
}
#endif


#endif // TISCSLIBF_H

Can anyone tell me what my problem is ?????




0 Kudos
7 Replies
mecej4
Honored Contributor III
918 Views
One problem stands out: the linker was not found on the execution path (%PATH%). As a consequence, the contents of your Fortran sources and the include files are irrelevant and diversionary.

At the same command prompt where you ran the compiler. type the command

link

If the linker is not found or if it is not the 64-bit version, you have to solve that problem before doing anything else. What to do to fix the problem, however, depends on details of your VS and IFort installation, so we can go into those if knowing those proves necessary.
0 Kudos
Les_Neilson
Valued Contributor II
918 Views
Did you install the 64bit options for Visual Studio ?
If I remember correctly when you install Visual Studio you have to specifically select the 64bit version - (32bit is the default)

Les
0 Kudos
TimP
Honored Contributor III
918 Views
VS2010 includes X64 as a default component of C++, unlike earlier VS. You still must add the C++ component in the VS2010 installation, then repair/reinstall ifort.
0 Kudos
Nebojsa_Cekic
Beginner
918 Views
Hello,

when i open the command prompt in C:\tmp\TESTS where all my files are and when i type ifort_wlmove i got the link error. When i typ in the command line link i got an error message that the command is not known.

So i have to configure VisualStudio2010 and the Fortran Compiler 11??? Can you tell me how? Thank you very much!
0 Kudos
Nebojsa_Cekic
Beginner
918 Views
im not sure but i think i have installed 64 bit. Now i will install everything new. I have a Windows 7 machine and will installa now first:
- Visual Studio 2010 (have i to confiigure vs2010 after installation? How?)
- Intel Fortran Compiler 11 for 64bit (have i to confiigure fortran after installation? How?)

Can anyone tell me the steps i have to do to get a working machine where this link error never apears again?!?!
0 Kudos
Nebojsa_Cekic
Beginner
918 Views
1. installed software on the windows 7 machine:
- visual studio 2010
- intel fortran 11
OK

2. try to repair Fortran compiler cause im not sure if i installed x64 additions. OK

3. Installation Options of Fortran:
Intel Visual Fortran Compiler Professional Edition
11.1.054 Update 4 for Windows*

Destination Folder(s)
C:\Program Files (x86)\Intel\Compiler\11.1\054\

Components
Intel Math Kernel Library
Intel MKL for applications running on IA-32
Intel MKL for applications running on Intel 64

Intel Visual Fortran Compiler Professional Edition
Microsoft Visual Studio* 2008 Shell
Intel Visual Fortran Compiler for applications running on IA-32
Intel Visual Fortran Compiler for applications running on Intel 64
Integration(s) in Microsoft Visual Studio*
Intel Parallel Debugger Extension
Integrated Documentation

Configuration Options
Microsoft Visual Studio* 2008 Shell will be used by the command-line compiler build environment
System PATH environment variable will be updated
Integration with Microsoft* Visual Studio* 2008 software

---> Ive installed everything!!! <---

4. After this ive tried again ifort wl_move and got this message:
C:\Windows\system32>cd /tmp/TESTS

C:\tmp\TESTS>ifort wl_move
Intel Visual Fortran Compiler Professional for applications running on IA-32,
Version 11.1 Build 20091130 Package ID: w_cprof_p_11.1.054
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
ifort: command line warning #10161: unrecognized source type 'wl_move'; object f
ile assumed

Microsoft Incremental Linker Version 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.

-out:wl_move.exe
-subsystem:console
wl_move
wl_move.obj : error LNK2019: unresolved external symbol __intel_new_proc_init re
ferenced in function MAIN__
wl_move.obj : error LNK2019: unresolved external symbol for_set_reentrancy refer
enced in function MAIN__
wl_move.obj : error LNK2019: unresolved external symbol for_cpystr referenced in
function MAIN__
wl_move.obj : error LNK2019: unresolved external symbol for_write_seq_lis refere
nced in function MAIN__
wl_move.obj : error LNK2019: unresolved external symbol for_write_seq_lis_xmit r
eferenced in function MAIN__
wl_move.obj : error LNK2001: unresolved external symbol _fltused
LINK : error LNK2001: unresolved external symbol mainCRTStartup
wl_move.exe : fatal error LNK1120: 7 unresolved externals

C:\tmp\TESTS>



No it seems the linker is working, but how to solve LNK2019 and LNK2001 and LNK1120????
0 Kudos
TimP
Honored Contributor III
918 Views
The compiler recognizes by default only source files with suffixes:
.f, .for default to f77 standard fixed form
.f90 defaults to f90 free form

You must get the compiler to recognize your inputs. If you do still fail to link against the Fortran run-time libraries when you have correctly formed inputs, please check whether those libraries are present.
.obj files can be recognized with other suffixes, but will provoke warnings, which don't distinguish between a compatible object and files generated by incompatible tools.
0 Kudos
Reply