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

Link errors using command line (compiling/linking VMS/VAX legacy code)

thomasglallen
Beginner
1,195 Views

I'm using the command line for compiling and linking. The code I have originated on a VAX (PDP-11). It compiles OK with warnings - the warnings are not critical to it's operation (I can fix these), but the link errors is what I don't understand. I think it might be a library that may need to be linked in. Don't know. The documentation doesn't seem to be clear on whether all the required libraries are linked in or not.If someone has some idea about the link errors below, that would be great.Below is the output as a result of using the following command line (used the /vms option for vms/vax extensions):

ifort /vms kipin.f kpmain.f kpdriv.f kpcell.f kplayer.f kprad.f kpgrid.f kpplot.f gen.f libmat.f libdevi.f libfrac.f libsand.f libsour.f libeqst.f genelas.f realgasm.f pest.f /exe:KIPIN.EXE /map:KIPIN.MAP

OUTPUT on DOS SCREEN:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

C:\\Data\\KIP\\Lahey Test>ifort /vms kipin.f kpmain.f kpdriv.f kpcell.f kplayer.f kprad.f kpgrid.f kpplot.f gen.f libmat.f libdevi.f libfrac.f libsand.f libsour.f libeqst.f genelas.f realgasm.f pest.f /exe:KIPIN.EXE /map:KIPIN.MAP /link /libs:qwin

Intel Visual Fortran Compiler XE for applications running on IA-32, Version 12.0.1.127 Build 20101116 Copyright (C) 1985-2010 Intel Corporation. All rights reserved.

kpmain.f(222): warning #7532: The number of arguments is incompatible with intrinsic procedure, assume 'external'. [FREE]

CALL FREE(NCV,PSAVE)

-----------^

kpmain.f(300): warning #6371: A jump into a block from outside the block may have occurred. [230]

GO TO 230

--------------^

kpmain.f(373): warning #6371: A jump into a block from outside the block may have occurred. [230]

IF (II.EQ.2) GO TO 230

-------------------------^

kplayer.f(588): warning #7532: The number of arguments is incompatible with intrinsic procedure, assume 'external'. [FREE]

CALL FREE (NSLOTSL,PL)

-----------^

kprad.f(415): warning #7532: The number of arguments is incompatible with intrinsic procedure, assume 'external'. [FREE]

CALL FREE(NRADPTS,PDUM)

-----------^

kpgrid.f(289): warning #7532: The number of arguments is incompatible with intrinsic procedure, assume 'external'. [FREE]

150 CALL FREE(1,I)

-----------^

kpgrid.f(376): warning #6371: A jump into a block from outside the block may have occurred. [4325]

IF (NRET.EQ.2) GOTO 4325

--------------------------^

kpgrid.f(836): warning #7532: The number of arguments is incompatible with intrinsic procedure, assume 'external'. [FREE]

CALL FREE(ITB,PT)

-----------^

kpplot.f(280): warning #6371: A jump into a block from outside the block may have occurred. [300]

READ (5,1060,ERR=300) I

-------------------------^

kpplot.f(283): warning #6371: A jump into a block from outside the block may have occurred. [300]

310 READ (5,1063,ERR=300) IDPTX_Y(1,PP)

-------------------------^

kpplot.f(285): warning #6371: A jump into a block from outside the block may have occurred. [300]

320 READ (5,1063,ERR=300) IDPTX_Y(2,PP)

-------------------------^

kpplot.f(1150): warning #7532: The number of arguments is incompatible with intrinsic procedure, assume 'external'. [FREE]

IF (PNP.NE.0) CALL FREE (NP,PNP) ---------------------------^

gen.f(387): warning #7532: The number of arguments is incompatible with intrinsic procedure, assume 'external'. [FREE]

CALL FREE(BUFN_REC(2,P)*BEAD_SPAC(2,P),IFS(1,PAD_UNIT(1,P)+I-1))

-------------^

gen.f(473): warning #7532: The number of arguments is incompatible with intrinsic procedure, assume 'external'. [FREE]

CALL FREE(BEAD_SPAC(2,P)*BUFN_REC(2,P),IDREC)

-----------^

gen.f(530): warning #7532: The number of arguments is incompatible with intrinsic procedure, assume 'external'. [FREE]

CALL FREE (NRA,BEAD_SPAC(1,P))

------------^

gen.f(703): warning #7532: The number of arguments is incompatible with intrinsic procedure, assume 'external'. [FREE]

IF (PBL.GT.0) CALL FREE(NRA,PBL)

-------------------------^

gen.f(902): warning #6371: A jump into a block from outside the block may have occurred. [10]

GO TO 10

--------------^

gen.f(939): warning #6371: A jump into a block from outside the block may have occurred. [105]

GO TO 105

------------^

gen.f(1142): warning #7532: The number of arguments is incompatible with intrinsic procedure, assume 'external'. [FREE]

CALL FREE (NRA,BEAD_SPAC(1,PF))

------------^

libmat.f(217): remark #8290: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D

+3'.

1031 FORMAT (' TOTAL =',F7.5)

----------------------------------^

libmat.f(213): remark #8290: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D

+3'.

1030 FORMAT(5X,A2,5X,F7.5)

-----------------------------^

libmat.f(346): remark #8290: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D

+3'.

1070 FORMAT(' SYM=',A2,' WTFRAC=',F7.5)

----------------------------------------------^

libmat.f(419): remark #8290: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D

+3'.

1070 FORMAT(10X,A2,9X,F7.5)

----------------------------^

libsand.f(282): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=

D+7'.

1061 FORMAT (' TOTAL THICKNESS =',1PG12.7,'CM = ',G12.7,'INCHES.')

-----------------------------------------^

libsand.f(282): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=

D+7'.

1061 FORMAT (' TOTAL THICKNESS =',1PG12.7,'CM = ',G12.7,'INCHES.')

-------------------------------------------------------^

pest.f(1082): warning #6371: A jump into a block from outside the block may have occurred. [1346]

GOTO 1346

-------------^

pest.f(1338): warning #6371: A jump into a block from outside the block may have occurred. [1630]

GOTO 1630

-------------^

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

-out:KIPIN.EXE

-map:KIPIN.MAP

-subsystem:console

/libs:qwin

kipin.obj

kpmain.obj

kpdriv.obj

kpcell.obj

kplayer.obj

kprad.obj

kpgrid.obj

kpplot.obj

gen.obj

libmat.obj

libdevi.obj

libfrac.obj

libsand.obj

libsour.obj

libeqst.obj

genelas.obj

realgasm.obj

pest.obj

LINK : warning LNK4044: unrecognized option '/libs:qwin'; ignored kipin.obj : error LNK2019: unresolved external symbol ___intel_new_proc_init referenced in function _MAIN__ kipin.obj : error LNK2019: unresolved external symbol _for_set_reentrancy referenced in function _MAIN__ realgasm.obj : error LNK2019: unresolved external symbol _for_write_seq_fmt referenced in function _REALGASMFREAD pest.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt libsand.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt libsour.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt libeqst.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt genelas.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt gen.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt libmat.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt libdevi.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt libfrac.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt kplayer.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt kprad.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt kpgrid.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt kpplot.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt kipin.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt kpmain.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt kpdriv.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt kpcell.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt gen.obj : error LNK2001: unresolved external symbol _for_stop_core libdevi.obj : error LNK2019: unresolved external symbol _for_stop_core referenced in function _DEVIATOR pest.obj : error LNK2001: unresolved external symbol _for_stop_core kipin.obj : error LNK2001: unresolved external symbol _for_stop_core kpmain.obj : error LNK2001: unresolved external symbol _for_stop_core kpcell.obj : error LNK2001: unresolved external symbol _for_stop_core kpgrid.obj : error LNK2001: unresolved external symbol _for_stop_core realgasm.obj : error LNK2019: unresolved external symbol _for_read_seq_fmt referenced in function _REALGASMFREAD pest.obj : error LNK2001: unresolved external symbol _for_read_seq_fmt libsand.obj : error LNK2001: unresolved external symbol _for_read_seq_fmt libsour.obj : error LNK2001: unresolved external symbol _for_read_seq_fmt libeqst.obj : error LNK2001: unresolved external symbol _for_read_seq_fmt genelas.obj : error LNK2001: unresolved external symbol _for_read_seq_fmt gen.obj : error LNK2001: unresolved external symbol _for_read_seq_fmt libmat.obj : error LNK2001: unresolved external symbol _for_read_seq_fmt libdevi.obj : error LNK2001: unresolved external symbol _for_read_seq_fmt libfrac.obj : error LNK2001: unresolved external symbol _for_read_seq_fmt kplayer.obj : error LNK2001: unresolved external symbol _for_read_seq_fmt kprad.obj : error LNK2001: unresolved external symbol _for_read_seq_fmt kpgrid.obj : error LNK2001: unresolved external symbol _for_read_seq_fmt kpplot.obj : error LNK2001: unresolved external symbol _for_read_seq_fmt kipin.obj : error LNK2001: unresolved external symbol _for_read_seq_fmt kpmain.obj : error LNK2001: unresolved external symbol _for_read_seq_fmt kpdriv.obj : error LNK2001: unresolved external symbol _for_read_seq_fmt kpcell.obj : error LNK2001: unresolved external symbol _for_read_seq_fmt kipin.obj : error LNK2019: unresolved external symbol __alloca_probe referenced in function _KIPGO kpmain.obj : error LNK2001: unresolved external symbol __alloca_probe gen.obj : error LNK2001: unresolved external symbol __alloca_probe kipin.obj : error LNK2019: unresolved external symbol _for_concat referenced in function _KIPGO kpmain.obj : error LNK2001: unresolved external symbol _for_concat kpplot.obj : error LNK2001: unresolved external symbol _for_concat gen.obj : error LNK2001: unresolved external symbol _for_concat libsour.obj : error LNK2019: unresolved external symbol _for_open referenced in function _SOURREAD libeqst.obj : error LNK2001: unresolved external symbol _for_open genelas.obj : error LNK2001: unresolved external symbol _for_open kpplot.obj : error LNK2001: unresolved external symbol _for_open gen.obj : error LNK2001: unresolved external symbol _for_open libmat.obj : error LNK2001: unresolved external symbol _for_open libsand.obj : error LNK2001: unresolved external symbol _for_open kipin.obj : error LNK2001: unresolved external symbol _for_open kpmain.obj : error LNK2001: unresolved external symbol _for_open kprad.obj : error LNK2001: unresolved external symbol _for_open kpgrid.obj : error LNK2001: unresolved external symbol _for_open libsour.obj : error LNK2019: unresolved external symbol _for_close referenced in function _SOURREAD libeqst.obj : error LNK2001: unresolved external symbol _for_close genelas.obj : error LNK2001: unresolved external symbol _for_close kpplot.obj : error LNK2001: unresolved external symbol _for_close gen.obj : error LNK2001: unresolved external symbol _for_close libmat.obj : error LNK2001: unresolved external symbol _for_close libsand.obj : error LNK2001: unresolved external symbol _for_close kipin.obj : error LNK2001: unresolved external symbol _for_close kpmain.obj : error LNK2001: unresolved external symbol _for_close kprad.obj : error LNK2001: unresolved external symbol _for_close kpgrid.obj : error LNK2001: unresolved external symbol _for_close libmat.obj : error LNK2019: unresolved external symbol _for_cpystr referenced in function _MATREAD libsand.obj : error LNK2001: unresolved external symbol _for_cpystr libsour.obj : error LNK2001: unresolved external symbol _for_cpystr libeqst.obj : error LNK2001: unresolved external symbol _for_cpystr kpmain.obj : error LNK2001: unresolved external symbol _for_cpystr kprad.obj : error LNK2001: unresolved external symbol _for_cpystr kpplot.obj : error LNK2001: unresolved external symbol _for_cpystr gen.obj : error LNK2001: unresolved external symbol _for_cpystr kpmain.obj : error LNK2019: unresolved external symbol _for_write_int_fmt referenced in function _TSREDIT kpplot.obj : error LNK2001: unresolved external symbol _for_write_int_fmt kpmain.obj : error LNK2019: unresolved external symbol _for_write_int_fmt_xmit referenced in function _TSREDIT kpplot.obj : error LNK2001: unresolved external symbol _for_write_int_fmt_xmit kpmain.obj : error LNK2019: unresolved external symbol _for_write_seq referenced in function _TOTWORN6 kpmain.obj : error LNK2019: unresolved external symbol _for_write_seq_xmit referenced in function _TOTWORN3 libdevi.obj : error LNK2001: unresolved external symbol ___libm_sse2_exp libeqst.obj : error LNK2019: unresolved external symbol ___libm_sse2_exp referenced in function _TISOOUT pest.obj : error LNK2001: unresolved external symbol ___libm_sse2_exp kpmain.obj : error LNK2001: unresolved external symbol ___libm_sse2_exp kprad.obj : error LNK2001: unresolved external symbol ___libm_sse2_exp kpgrid.obj : error LNK2001: unresolved external symbol ___libm_sse2_exp libmat.obj : error LNK2001: unresolved external symbol ___libm_sse2_exp libmat.obj : error LNK2019: unresolved external symbol ___libm_sse2_log referenced in function _MATINIT pest.obj : error LNK2001: unresolved external symbol ___libm_sse2_log kpmain.obj : error LNK2001: unresolved external symbol ___libm_sse2_log kplayer.obj : error LNK2001: unresolved external symbol ___libm_sse2_log kprad.obj : error LNK2001: unresolved external symbol ___libm_sse2_log kpgrid.obj : error LNK2001: unresolved external symbol ___libm_sse2_log pest.obj : error LNK2019: unresolved external symbol __fltused referenced in function _PEST libsour.obj : error LNK2001: unresolved external symbol __fltused libeqst.obj : error LNK2001: unresolved external symbol __fltused genelas.obj : error LNK2001: unresolved external symbol __fltused realgasm.obj : error LNK2001: unresolved external symbol __fltused libmat.obj : error LNK2001: unresolved external symbol __fltused libdevi.obj : error LNK2001: unresolved external symbol __fltused libfrac.obj : error LNK2001: unresolved external symbol __fltused libsand.obj : error LNK2001: unresolved external symbol __fltused kprad.obj : error LNK2001: unresolved external symbol __fltused kpgrid.obj : error LNK2001: unresolved external symbol __fltused kpplot.obj : error LNK2001: unresolved external symbol __fltused gen.obj : error LNK2001: unresolved external symbol __fltused kpmain.obj : error LNK2001: unresolved external symbol __fltused kpdriv.obj : error LNK2001: unresolved external symbol __fltused kpcell.obj : error LNK2001: unresolved external symbol __fltused kplayer.obj : error LNK2001: unresolved external symbol __fltused pest.obj : error LNK2019: unresolved external symbol _for_write_seq_fmt_xmit referenced in function _PEST libfrac.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt_xmit libsand.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt_xmit libsour.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt_xmit libeqst.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt_xmit kpplot.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt_xmit gen.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt_xmit libmat.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt_xmit libdevi.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt_xmit kpdriv.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt_xmit kpcell.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt_xmit kprad.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt_xmit kpgrid.obj : error LNK2001: unresolved external symbol _for_write_seq_fmt_xmit libsand.obj : error LNK2001: unresolved external symbol _for_read_seq_fmt_xmit libsour.obj : error LNK2001: unresolved external symbol _for_read_seq_fmt_xmit libeqst.obj : error LNK2001: unresolved external symbol _for_read_seq_fmt_xmit kpdriv.obj : error LNK2019: unresolved external symbol _for_read_seq_fmt_xmit referenced in function _DRIVREAD gen.obj : error LNK2001: unresolved external symbol _for_read_seq_fmt_xmit libmat.obj : error LNK2001: unresolved external symbol _for_read_seq_fmt_xmit libdevi.obj : error LNK2001: unresolved external symbol _for_read_seq_fmt_xmit libeqst.obj : error LNK2001: unresolved external symbol _for_write_seq_lis realgasm.obj : error LNK2001: unresolved external symbol _for_write_seq_lis pest.obj : error LNK2019: unresolved external symbol _for_write_seq_lis referenced in function _PEST libdevi.obj : error LNK2001: unresolved external symbol _for_write_seq_lis libfrac.obj : error LNK2001: unresolved external symbol _for_write_seq_lis libsand.obj : error LNK2001: unresolved external symbol _for_write_seq_lis libsour.obj : error LNK2001: unresolved external symbol _for_write_seq_lis kpgrid.obj : error LNK2001: unresolved external symbol _for_write_seq_lis kpplot.obj : error LNK2001: unresolved external symbol _for_write_seq_lis gen.obj : error LNK2001: unresolved external symbol _for_write_seq_lis libmat.obj : error LNK2001: unresolved external symbol _for_write_seq_lis kpdriv.obj : error LNK2001: unresolved external symbol _for_write_seq_lis kpcell.obj : error LNK2001: unresolved external symbol _for_write_seq_lis kplayer.obj : error LNK2001: unresolved external symbol _for_write_seq_lis kprad.obj : error LNK2001: unresolved external symbol _for_write_seq_lis pest.obj : error LNK2019: unresolved external symbol _for_write_seq_lis_xmit referenced in function _PEST libfrac.obj : error LNK2001: unresolved external symbol _for_write_seq_lis_xmit libsand.obj : error LNK2001: unresolved external symbol _for_write_seq_lis_xmit libsour.obj : error LNK2001: unresolved external symbol _for_write_seq_lis_xmit libeqst.obj : error LNK2001: unresolved external symbol _for_write_seq_lis_xmit kpplot.obj : error LNK2001: unresolved external symbol _for_write_seq_lis_xmit gen.obj : error LNK2001: unresolved external symbol _for_write_seq_lis_xmit libmat.obj : error LNK2001: unresolved external symbol _for_write_seq_lis_xmit libdevi.obj : error LNK2001: unresolved external symbol _for_write_seq_lis_xmit kpdriv.obj : error LNK2001: unresolved external symbol _for_write_seq_lis_xmit kpcell.obj : error LNK2001: unresolved external symbol _for_write_seq_lis_xmit kplayer.obj : error LNK2001: unresolved external symbol _for_write_seq_lis_xmit kpgrid.obj : error LNK2001: unresolved external symbol _for_write_seq_lis_xmit libsand.obj : error LNK2001: unresolved external symbol _for_read_seq_lis libsour.obj : error LNK2001: unresolved external symbol _for_read_seq_lis genelas.obj : error LNK2001: unresolved external symbol _for_read_seq_lis pest.obj : error LNK2019: unresolved external symbol _for_read_seq_lis referenced in function _PEST kpplot.obj : error LNK2001: unresolved external symbol _for_read_seq_lis gen.obj : error LNK2001: unresolved external symbol _for_read_seq_lis libmat.obj : error LNK2001: unresolved external symbol _for_read_seq_lis libdevi.obj : error LNK2001: unresolved external symbol _for_read_seq_lis kpcell.obj : error LNK2001: unresolved external symbol _for_read_seq_lis kplayer.obj : error LNK2001: unresolved external symbol _for_read_seq_lis kprad.obj : error LNK2001: unresolved external symbol _for_read_seq_lis kpgrid.obj : error LNK2001: unresolved external symbol _for_read_seq_lis libsand.obj : error LNK2001: unresolved external symbol _for_cpstr libsour.obj : error LNK2001: unresolved external symbol _for_cpstr kplayer.obj : error LNK2019: unresolved external symbol _for_cpstr referenced in function _LAYER kpplot.obj : error LNK2001: unresolved external symbol _for_cpstr gen.obj : error LNK2001: unresolved external symbol _for_cpstr libmat.obj : error LNK2001: unresolved external symbol _for_cpstr kplayer.obj : error LNK2019: unresolved external symbol ___powr8i4 referenced in function _LAYREAD kpgrid.obj : error LNK2001: unresolved external symbol ___powr8i4 pest.obj : error LNK2001: unresolved external symbol ___powr8i4 pest.obj : error LNK2019: unresolved external symbol _for_read_seq_lis_xmit referenced in function _PEST kprad.obj : error LNK2001: unresolved external symbol _for_read_seq_lis_xmit kpplot.obj : error LNK2001: unresolved external symbol _for_read_seq_lis_xmit libsour.obj : error LNK2001: unresolved external symbol _for_read_seq_lis_xmit genelas.obj : error LNK2001: unresolved external symbol _for_read_seq_lis_xmit kpplot.obj : error LNK2019: unresolved external symbol _for_read_int_fmt referenced in function _KPPLOT gen.obj : error LNK2019: unresolved external symbol _for_f90_index referenced in function _STRCAT gen.obj : error LNK2019: unresolved external symbol ___powi4i4 referenced in function _INTTOSTR gen.obj : error LNK2019: unresolved external symbol _for_write_dir_i8 referenced in function _BUFMOVE gen.obj : error LNK2019: unresolved external symbol _for_read_dir_i8 referenced in function _BUFMOVE gen.obj : error LNK2019: unresolved external symbol _for_inquire referenced in function _FILESEARCH libmat.obj : error LNK2019: unresolved external symbol ___libm_sse2_pow referenced in function _EXPDEOS pest.obj : error LNK2001: unresolved external symbol ___libm_sse2_pow LINK : error LNK2001: unresolved external symbol _mainCRTStartup

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

0 Kudos
5 Replies
TimP
Honored Contributor III
1,195 Views
Did you fail to set the library paths for your link? When you open the command prompt window from the Start menu shortcut for the appropriate Visual Studio mode, the ifortvars script is run for you.
SET will show you whether your ifort paths are set.
The 64-bit linux counterpart of this version of ifort is missing some sse2 libraries, but you can deal with that bridge if you come to it by a normal route.
0 Kudos
Wendy_Doerner__Intel
Valued Contributor I
1,195 Views
Here is information from the documentation on how to set the environment variables for invoking ifort from the command line.


------

Wendy

Attaching or including files in a post


Using the compilervars File to Specify Location of Components

Before you first invoke the compiler, you need to be sure certain environment variables are set. These environment variables define the location of the various compiler-related components.

The Intel Fortran Compiler installation includes a file that you can run to set environment variables.

  • On Linux* OS and Mac OS* X, the file is a shell script called compilervars.sh or compilervars.csh.

  • On Windows* OS, the file is a batch file called compilervars.bat.

The following information is operating system-dependent.

. . .

Windows OS:

Under normal circumstances, you do not need to run the compilervars.bat batch file. The Fortran command-line window sets these variables for you automatically.

To activate this command-line window, select the desired command line mode such as IA-32 Visual Studio 2008 mode available from the Start>All Programs><your installed product> menu item.

Note

You will need to run the batch file if you open a command-line window without using one of the provided menu items in the Intel Compiler program folder or if you want to use the compiler from a script of your own.

The batch file inserts the directories used by Intel Fortran at the beginning of the existing paths. Because these directories appear first, they are searched before any directories in the path lists provided by Windows OS. This is especially important if the existing path includes directories with files having the same names as those needed by Intel Fortran.

If needed, you can run compilervars.bateach time you begin a session on Windows* systems by specifying it as the initialization file with the PIF Editor.

The batch file takes two arguments:

\bin\compilervars.bat []

is one of the following

  • ia32: Compiler and libraries for IA-32 architecture only

  • ia32_intel64: Compiler running on IA-32 architecture that generates code for Intel 64 architecture; uses Intel 64 architecture libraries

  • intel64: Compiler and libraries for Intel 64 architecture only

, if specified, is one of the following:

  • vs2005: Microsoft Visual Studio 2005
  • vs2008: Microsoft Visual Studio 2008
  • vs2010: Microsoft Visual Studio 2010

If is not specified, the script uses the version of Visual Studio that was detected during the installation procedure.

0 Kudos
Steven_L_Intel1
Employee
1,195 Views
It looks to me as if you put /link /libs:qwin on the command - that is not correct. /libs is a compiler option, and anything after /link is sent to the linker.

So either remove both of these (if your program originated on the PDP-11 it certainly isn't usng QuickWin) or add /libs:qwin before your list of source files.

Do make sure you are doing the build from a Fortran "build environment" window.
0 Kudos
Martyn_C_Intel
Employee
1,195 Views

To be a little more explicit:
to open a command window, you should go to the start menu:
All programs / Intel Parallel Studio XE 2011 / Command Prompt / Parallel Studio XE with Intel Compiler XE v 12.0 /IA32 Visual Studio2008 mode (or 2010 mode, if you have VS2010).
As Tim says, this will give you a command window with all the environment variables set, so that the linker knows where to find the libraries. It looks like you might have been working from a regular DOS command prompt.

If you need the QuickWin libraries, you should use /libs:qwin without the "/link" switch. /libs:qwin is a compiler option, not a linker option.
In Intel Visual Fortran, the intrinsic subroutine FREE is an extension to the standard. If you have your own version of FREE, that's fine; if your code was expecting an intrinsic, you'll need to adapt (check the reference guide).

0 Kudos
thomasglallen
Beginner
1,195 Views
Thanks to everyone. I compiled and linked everything in the I-32 Visual Studio 2008 mode. I'm assuming this sets the environment variables. I'll try once more and run compilevars.bat, I believe I remember running that, but I still got the link errors. Let me try once more to make sure and I'll get back to everyone again.
Tom
0 Kudos
Reply