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

Creating a Fortran Dll using IMSL static library

akrallis
Beginner
827 Views
I tried to create a Fortran DLL using the IMSL static library. In order to do that I included the following code:

INCLUDE 'link_fnl_static.h'
!DEC$ OBJCOMMENT lib:"libguide.lib"

The following error message appeared during building:

1>------ Rebuild All started: Project: Dll1, Configuration: Release Win32 ------
1>Deleting intermediate files and output files for project 'Dll1', configuration 'Release|Win32'.
1>Compiling with Intel Fortran Compiler 10.1.025 [IA-32]...
1>MYMOD.f90
1>DLL.f90
1>Compiling manifest to resources...
1>Microsoft Windows Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Linking...
1> Creating library C:\Documents and Settings\User\Desktop\Project\Dll1\Dll1\release\dll1.lib and object C:\Documents and Settings\User\Desktop\Project\Dll1\Dll1\release\dll1.exp
1>imsl.lib(DIVPAG.obj) : error LNK2019: unresolved external symbol __FIanint referenced in function _DIVPAG
1>imsl.lib(DI2PAG.obj) : error LNK2001: unresolved external symbol __FIanint
1>imsl.lib(ACHAR.obj) : error LNK2019: unresolved external symbol __OtsMove referenced in function _ACHAR
1>imsls_err.lib(e1psh.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsls_err.lib(e1init.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DCRBRB.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DTRSV.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DLSLRT.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DTBSV.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DLFSQS.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DGER.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DCRGRG.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(IUMAG.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DSBMV.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DLFSRG.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DLFSDS.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DLFSRB.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DLFTQS.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DGEMV.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DSYMV.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DGBMV.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DI12AG.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DL2TRG.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DL2TRB.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DLFTDS.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DIVPAG.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DI2PAG.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DMACH.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DI13AG.obj) : error LNK2001: unresolved external symbol __OtsMove
1>imsl.lib(DNRM2.obj) : error LNK2001: unresolved external symbol __FIsqrt
1>imsl.lib(DI3PRK.obj) : error LNK2019: unresolved external symbol __FIsqrt referenced in function _DI3PRK
1>imsl.lib(DI2PAG.obj) : error LNK2001: unresolved external symbol __FIsqrt
1>imsl.lib(DLFTDS.obj) : error LNK2001: unresolved external symbol __FIsqrt
1>imsl.lib(DLFTQS.obj) : error LNK2001: unresolved external symbol __FIsqrt
1>imsl.lib(di4pag.obj) : error LNK2019: unresolved external symbol __FIIfexp_ referenced in function _DI4PAG
1>imsls_err.lib(e1psh.obj) : error LNK2019: unresolved external symbol __OtsMoveMinimum referenced in function _E1PSH
1>imsls_err.lib(m1vech.obj) : error LNK2001: unresolved external symbol __OtsMoveMinimum
1>imsls_err.lib(e1psh.obj) : error LNK2019: unresolved external symbol __OtsFill referenced in function _E1PSH
1>imsls_err.lib(e1init.obj) : error LNK2001: unresolved external symbol __OtsFill
1>imsls_err.lib(m1vech.obj) : error LNK2001: unresolved external symbol __OtsFill
1>imsls_err.lib(e1pop.obj) : error LNK2019: unresolved external symbol __OtsStringCompareEqlPadded referenced in function _E1POP
1>imsls_err.lib(c1tci.obj) : error LNK2019: unresolved external symbol __OtsStringIndex referenced in function _C1TCI
1>imsls_err.lib(e1ucs.obj) : error LNK2019: unresolved external symbol __FXDMOD referenced in function _E1UCS
1>imsls_err.lib(e1ucs.obj) : error LNK2001: unresolved external symbol __FXDMOD
1>imsls_err.lib(e1ucs.obj) : error LNK2001: unresolved external symbol __FXDMOD
1>Release\Dll1.dll : fatal error LNK1120: 9 unresolved externals
1>
1>Build log written to "file://C:\Documents and Settings\User\Desktop\Project\Dll1\Dll1\Release\BuildLog.htm"
1>Dll1 - 46 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

I also tried to follow your advice provided in other discussions in this forum using the \Qopenmp directive. A similar error message appeared.

However when I used the IMSL dll:

INCLUDE 'link_fnl_shared.h'

everything worked fine. Could you please provide me a way to produce a Fortran DLL using the static form and not the dynamic formof the IMSL library?
0 Kudos
1 Solution
Steven_L_Intel1
Employee
827 Views
You have something seriously wrong with the executable and library paths you are using. I see references to Microsoft Resource Compiler 6.0 and you're getting an IMSL from CVF and not Intel Fortran.

In Visual Studio, select Tools > Options > Intel Fortran > Compiler. Click on the ... button next to Executable Files and make sure there are no CVF folders listed. Do the same for Library and Include files. Make sure that the IMSL folders from Intel Visual Fortran are listed appropriately for Include and Library files (probably are if link_fnl_shared works.)

If CVF folders appear in those lists it's because they're in the system PATH, LIB and INCLUDE environment variables. I recommend editing those variables to remove them - it won't hurt your use of CVF. Right click on My Computer, select Properties, Advanced, Environment Variables.

View solution in original post

0 Kudos
1 Reply
Steven_L_Intel1
Employee
828 Views
You have something seriously wrong with the executable and library paths you are using. I see references to Microsoft Resource Compiler 6.0 and you're getting an IMSL from CVF and not Intel Fortran.

In Visual Studio, select Tools > Options > Intel Fortran > Compiler. Click on the ... button next to Executable Files and make sure there are no CVF folders listed. Do the same for Library and Include files. Make sure that the IMSL folders from Intel Visual Fortran are listed appropriately for Include and Library files (probably are if link_fnl_shared works.)

If CVF folders appear in those lists it's because they're in the system PATH, LIB and INCLUDE environment variables. I recommend editing those variables to remove them - it won't hurt your use of CVF. Right click on My Computer, select Properties, Advanced, Environment Variables.
0 Kudos
Reply