- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
I wrote a simple program calling one of the IMSL routines, "DLINRG", with the Intel FORTRAN compiler 8.0 within the Visual Studio environment. The program contains USE NUMERICAL_LIBRARIES (but I'm not sure that's correct for using IMSL).
I keep getting an LNK2019, unresolved external for DLINRG. What do I need to do???? The correct VNI directory has been added to the link path, but the linker never searches that directory. Below is the build output text...
"------ Build started: Project: testMe, Configuration: Debug|Win32 ------
Deleting intermediate files and output files for project 'testMe', configuration 'Debug|Win32'.
Compiling...
ifort /nologo /Zi /Od /module:"Debug/" /object:"Debug/" /traceback /check:bounds /c D:Dataursorg estMe estMe.f90
Linking...
Link /OUT:"Debug/testMe.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:Program FilesVNICTT5.0libintel32" /DEBUG /PDB:"Debug/testMe.pdb" /SUBSYSTEM:CONSOLE /VERBOSE:LIB Debug/testMe.obj
Link: executing 'link'
Searching libraries
Searching C:program filesIntelFortranCompiler80Ia32Libifconsol.lib:
Searching C:program filesIntelFortranCompiler80Ia32Liblibifcore.lib:
Searching C:program filesIntelFortranCompiler80Ia32Liblibifport.lib:
Searching C:program filesIntelFortranCompiler80Ia32Liblibm.lib:
Searching C:program filesMicrosoft Visual Studio .NET 2003Vc7libLIBC.lib:
Searching C:program filesIntelFortranCompiler80Ia32Liblibirc.lib:
Searching C:program filesMicrosoft Visual Studio .NET 2003Vc7libOLDNAMES.lib:
Searching C:program filesMicrosoft Visual Studio .NET 2003Vc7PlatformSDKlibuuid.lib:
Searching C:program filesMicrosoft Visual Studio .NET 2003Vc7libkernel32.lib:
Searching C:program filesIntelFortranCompiler80Ia32Libifconsol.lib:
Searching C:program filesIntelFortranCompiler80Ia32Liblibifcore.lib:
Searching C:program filesIntelFortranCompiler80Ia32Liblibifport.lib:
Searching C:program filesIntelFortranCompiler80Ia32Liblibm.lib:
Searching C:program filesMicrosoft Visual Studio .NET 2003Vc7libLIBC.lib:
Searching C:program filesIntelFortranCompiler80Ia32Liblibirc.lib:
Searching C:program filesMicrosoft Visual Studio .NET 2003Vc7libOLDNAMES.lib:
Searching C:program filesMicrosoft Visual Studio .NET 2003Vc7PlatformSDKlibuuid.lib:
Searching C:program filesMicrosoft Visual Studio .NET 2003Vc7libkernel32.lib:
Searching C:program filesIntelFortranCompiler80Ia32Libifconsol.lib:
Searching C:program filesIntelFortranCompiler80Ia32Liblibifcore.lib:
Searching C:program filesIntelFortranCompiler80Ia32Liblibifport.lib:
Searching C:program filesIntelFortranCompiler80Ia32Liblibm.lib:
Finished searching libraries
testMe.obj : error LNK2019: unresolved external symbol _DLINRG referenced in function _MAIN__
Debug/testMe.exe : fatal error LNK1120: 1 unresolved externals
testMe build failed."
-Robert
- Etiquetas:
- Intel® Fortran Compiler
Enlace copiado
10 Respuestas
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
It would seem that, unlike in CVF, Visual Numerics did not add the OBJCOMMENT directives to NUMERICAL_LIBRARIES to cause the libraries to be searched. You can add the library names under the Link properties tab of your project.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Hi Steve,
Thanks for wading through that mess (it was nicely formatted on my screen). I attempted to add all the library files using the "Properties>Linker>General>AdditionalLibraryDirectories". And,it shows up at the link command line,
Link /OUT:"Debug/testMe.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:Program FilesVNICTT5.0libintel32" /DEBUG /PDB:"Debug/testMe.pdb" /SUBSYSTEM:CONSOLE /VERBOSE:LIB Debug/testMe.objHowever, if I use the /VERBOSE:LIB command, the linker never searches that path for the appropriate library. Is there something I'm missing here?
Thanks,
-Robert
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
You have to aadd the actual library names under Link..Input..Additional Dependencies. imsl.lib imsls_err.lib imslscalar.lib
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Thanks - that worked like a charm. I was under the impression adding the library path was enough. Live and learn!
-Robert
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Additional Information,
When I was converting a large CVF workspace to an IVF solution, the "Properties>Fortran>ExternalProcedures>CallingConvention" was automatically set to "CVF". This would have worked fine, except the new IVF IMSL library calling convention is different (ie. the @xx is not appended to the end of the funtion name). In order to solve this problem, set the calling convention to "Default".
If working with IMSL libraries, and receiving unresolved external link errors, check to see if the "@xx" is appended to the end of the function. If so, what I said above could be the culprit.
-Robert
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
May I offer another comment about this thread.
I had considerable difficulty getting the IMSL library linked to a simple example supplied by IMSL in their example directory (C:Program FilesVNICTT5.0examplesintel32f90validate).
What I eventually discovered was that under the property tabbed sheet - Linker, General, Additional Library Directories - is that you don't need to include the /LIBPATH: when putting the text in the box. The IDE will automatically add it for you. As well, the LIBPATH should appear as "C:Program FilesVNICTT5.0libintel32" in the box. I believe there's a "" missing between the "5.0" and the "lib" in the line under Steve's reply above.
Another note is that the verbose output for the linker is turned on by selecting, under Linker, General, Show Progress and then selecting either Display All or Display Some Progress Messages.
I hope this helps someone else that may be struggling with linking to the IMSL libraries.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
The next release will include a new section of the User Guide that covers all of this in detail. I don't recommend doing this with "Additional Library Directories.
I have attached the new manual pages to this message.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
This is an excellent addition to the IVF docs. I find no fault with it.
Thanks,
Gerry T.
Thanks,
Gerry T.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Steve
I don't see the attachment.
Thanks
I don't see the attachment.
Thanks
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
The attachment is gone - it is from 2004 and is obsolete anyway. The information is in the on-disk documentation under Building Applications > Using Libraries > Using IMSL. You should also read this article.
Responder
Opciones de temas
- Suscribirse a un feed RSS
- Marcar tema como nuevo
- Marcar tema como leído
- Flotar este Tema para el usuario actual
- Favorito
- Suscribir
- Página de impresión sencilla