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

Intel Visual Fortran 9.1 and Microsoft Visual Studio 2005

mcaggie
Einsteiger
1.889Aufrufe
I write a subroutine in Fortran and use IVF 9.1 as the compiler. MVS 2005 is used as the linker. I can compile my program successfully. However, when I link the obj files, an LNK2019 errors come out. Here is my compile batch file:

@ECHO OFF
FLECS32 "CONEC.flx" -L NO -F PSS001.FOR -W 132 -F77
IFORT /nologo /Oy- /assume:buffered_io /traceback /libs:dll /threads /c /Qip ^
/extend_source:132 /noaltparam /fpscomp:logicals /warn:nodeclarations ^
/warn:unused /warn:truncated_source /Qauto /Op /iface:cvf /define:DLLI ^
/include:"C:Program FilesPTIPSSE31PSSLIB" ^
/object:"CONEC.OBJ" ^
PSS001.FOR
DEL PSS001.FOR
@ECHO OFF
FLECS32 "CONET.flx" -L NO -F PSS001.FOR -W 132 -F77
IFORT /nologo /Oy- /assume:buffered_io /traceback /libs:dll /threads /c /Qip ^
/extend_source:132 /noaltparam /fpscomp:logicals /warn:nodeclarations ^
/warn:unused /warn:truncated_source /Qauto /Op /iface:cvf /define:DLLI ^
/include:"C:Program FilesPTIPSSE31PSSLIB" ^
/object:"CONET.OBJ" ^
PSS001.FOR
DEL PSS001.FOR
@REM
IF "%1"=="" GOTO SKIP
@REM ----------------CUT HERE----------------
FLECS32 "%1" -L NO -F "%1.F" -W 132 -F77
IFORT /nologo /Oy- /assume:buffered_io /traceback /libs:dll /threads /c /Qip ^
/extend_source:132 /noaltparam /fpscomp:logicals /warn:nodeclarations ^
/warn:unused /warn:truncated_source /Qauto /Op /iface:cvf /define:DLLI ^
/include:"C:Program FilesPTIPSSE31PSSLIB" ^
/object:"%1.OBJ" ^
"%1.F"
@REM ----------------CUT HERE----------------
:SKIP
@ECHO If no errors, run "cload4"

Below is the link file

@echo off

rem Build up the OBJLIST enviroment variable so it contains a space-delimited
rem list of all the OBJ files that were specified by the user.

set OBJLIST=%1
shift
:MORE
if "%1" == "" goto BUILT
set OBJLIST=%OBJLIST% %1
shift
goto MORE
:BUILT

rem Note that PARSE32 will output a BAT file which will set BASEDIR (the directory
rem containing the installed version of PSSE) along with a series of SET commands
rem which will define one PTIOBx environment variable for every OBJ file which the
rem user specified. (Any unneeded - but currently defined - PTIOBx enviroment
rem variables will be set to NULL in the generated BAT file.)

PARSE32 ~PARSE.BAT %OBJLIST%
IF ERRORLEVEL 1 GOTO CLEANUP
CALL ~PARSE.BAT

IF EXIST ~DSUSR.FILES DEL ~DSUSR.FILES

IF NOT "%PTIOB1%"=="" echo %PTIOB1% >>~DSUSR.FILES
IF NOT "%PTIOB2%"=="" echo %PTIOB2% >>~DSUSR.FILES
IF NOT "%PTIOB3%"=="" echo %PTIOB3% >>~DSUSR.FILES
IF NOT "%PTIOB4%"=="" echo %PTIOB4% >>~DSUSR.FILES
IF NOT "%PTIOB5%"=="" echo %PTIOB5% >>~DSUSR.FILES
IF NOT "%PTIOB6%"=="" echo %PTIOB6% >>~DSUSR.FILES
IF NOT "%PTIOB7%"=="" echo %PTIOB7% >>~DSUSR.FILES
IF NOT "%PTIOB8%"=="" echo %PTIOB8% >>~DSUSR.FILES
IF NOT "%PTIOB9%"=="" echo %PTIOB9% >>~DSUSR.FILES
IF NOT "%PTIOBA%"=="" echo %PTIOBA% >>~DSUSR.FILES
IF NOT "%PTIOBB%"=="" echo %PTIOBB% >>~DSUSR.FILES
IF NOT "%PTIOBC%"=="" echo %PTIOBC% >>~DSUSR.FILES
IF NOT "%PTIOBD%"=="" echo %PTIOBD% >>~DSUSR.FILES
IF NOT "%PTIOBE%"=="" echo %PTIOBE% >>~DSUSR.FILES
IF NOT "%PTIOBF%"=="" echo %PTIOBF% >>~DSUSR.FILES
IF NOT "%PTIOBG%"=="" echo %PTIOBG% >>~DSUSR.FILES
IF NOT "%PTIOBH%"=="" echo %PTIOBH% >>~DSUSR.FILES
IF NOT "%PTIOBI%"=="" echo %PTIOBI% >>~DSUSR.FILES
IF NOT "%PTIOBJ%"=="" echo %PTIOBJ% >>~DSUSR.FILES
IF NOT "%PTIOBK%"=="" echo %PTIOBK% >>~DSUSR.FILES
IF NOT "%PTIOBL%"=="" echo %PTIOBL% >>~DSUSR.FILES
IF NOT "%PTIOBM%"=="" echo %PTIOBM% >>~DSUSR.FILES
IF NOT "%PTIOBN%"=="" echo %PTIOBN% >>~DSUSR.FILES
IF NOT "%PTIOBO%"=="" echo %PTIOBO% >>~DSUSR.FILES
IF NOT "%PTIOBP%"=="" echo %PTIOBP% >>~DSUSR.FILES
IF NOT "%PTIOBQ%"=="" echo %PTIOBQ% >>~DSUSR.FILES
IF NOT "%PTIOBR%"=="" echo %PTIOBR% >>~DSUSR.FILES
IF NOT "%PTIOBS%"=="" echo %PTIOBS% >>~DSUSR.FILES
IF NOT "%PTIOBT%"=="" echo %PTIOBT% >>~DSUSR.FILES
IF NOT "%PTIOBU%"=="" echo %PTIOBU% >>~DSUSR.FILES
IF NOT "%PTIOBV%"=="" echo %PTIOBV% & gt;>~DSUSR.FILES
IF NOT "%PTIOBW%"=="" echo %PTIOBW% >>~DSUSR.FILES
IF NOT "%PTIOBX%"=="" echo %PTIOBX% >>~DSUSR.FILES
IF NOT "%PTIOBY%"=="" echo %PTIOBY% >>~DSUSR.FILES
IF NOT "%PTIOBZ%"=="" echo %PTIOBZ% >>~DSUSR.FILES

IF EXIST CONEC.OBJ echo CONEC.OBJ >>~DSUSR.FILES
IF EXIST CONET.OBJ echo CONET.OBJ >>~DSUSR.FILES
echo "%BASEDIR%PSSLIBPSSENG.LIB" >>~DSUSR.FILES
echo "%BASEDIR%PSSLIBPTIUTILS.LIB" >>~DSUSR.FILES
echo "%BASEDIR%PSSLIBCRUTCH.LIB" >>~DSUSR.FILES
echo "%BASEDIR%PSSLIBDSMDL.LIB" >>~DSUSR.FILES

rem create map file (link without def file)
link /INCREMENTAL:NO /NOLOGO /DLL /SUBSYSTEM:WINDOWS /MACHINE:X86 ^
/ERRORREPORT:PROMPT /OUT:"DSUSR.DLL" /MAP:"DSUSR.MAP" @~DSUSR.FILES

rem create definition file
makedef "DSUSR.MAP" "DSUSR.DEF"

rem link with def file
link /INCREMENTAL:NO /NOLOGO /DLL /SUBSYSTEM:WINDOWS /MACHINE:X86 ^
/ERRORREPORT:PROMPT /OUT:"DSUSR.DLL" /MAP:"DSUSR.MAP" ^
/DEF:"DSUSR.DEF" @~DSUSR.FILES

:cleanup

IF EXIST ~DSUSR.FILES DEL ~DSUSR.FILES
IF EXIST ~PARSE.BAT DEL ~PARSE.BAT
SET BASEDIR=
SET OBJLIST=

I have no any experience about IVF 9.1 compiler and MSV 2005 linker. Could you please give me some hint?

0 Kudos
6 Antworten
Steven_L_Intel1
Mitarbeiter
1.889Aufrufe
What is the actual and complete text of the error messages?
mcaggie
Einsteiger
1.889Aufrufe
It is
"
CONET.OBJ: error LNK2019: unresolved external symbol _BEACON@16 reference in function _CONET
DSUSR.DLL : fatal error LNK1120: 1 unresolved externals
Makedef has created a new EXPORTS file: DSUSR.DEF
containing 0 export entries
Creating library DSUSR.lib and object DSUSR.exp
CONET.OBJ: error LNK2019: unresolved external symbol _BEACON@16 reference in function _CONET
DSUSR.DLL : fatal error LNK1120: 1 unresolved externals
"
Steven_L_Intel1
Mitarbeiter
1.889Aufrufe
Ok. You haven't shown the source, but I note that you are compiling with /iface:cvf which means that the STDCALL calling convention will be used. You have calls to a routine BEACON with four argument positions used. CHARACTER arguments take up two positions. The most likely explanation is that you have a mismatch between the call and the called routine in the number or type of arguments. Check for that.

If you were using version 10 or 10.1 you could also add the switches /gen-interface /warn:interface and see if you get additional diagnostics.
paulsurajit
Einsteiger
1.889Aufrufe

We want to purchase single user ormulti users Fortran Compiler (Intel Fortran compiler 8.1 or 9.1) and Microsoft Visual Studio .Net 2003. Please quote as quick as possible.

Surajit Kumar Paul

MNL, Jamshedpur, India
TimP
Geehrter Beitragender III
1.889Aufrufe
Note the "Where to Buy" link displayed near the top of the screen.
Steven_L_Intel1
Mitarbeiter
1.889Aufrufe
You cannot buy versions 8.1 or 9.1. But you can buy version 10.1 and register the license. Then you can log in to the Intel Registration Center and download an older compiler if you specifically need that.

Intel does not sell Visual Studio 2003 - you will have to buy that from an independent reseller. Some of these will sell you a "bundle" of the Intel compiler and Visual Studio. Note that Intel Visual Fortran 10.1 includes Microsoft Visual Studio 2005 Premier Partner Edition so you don't have to install anything else to build Fortran applications with 10.1.
Antworten