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

unresolved external symbol _vmlsExp4

Nick2
New Contributor I
652 Views
Hello,
I am trying to split my code up into a library and a main project. When I build my library, add the .lib to the main project, and try to compile, I get this:
Error2 error LNK2001: unresolved external symbol _vmlsExp4
If I just dump all the files into one big project, it works fine. Errr isn't that a part of the SSE2 library?
Ideas?
Nick
0 Kudos
4 Replies
Steven_L_Intel1
Employee
652 Views
Is the code all Fortran? Are you specifying the same "Use run-time library" options for both projects?

Try this - in the library project, set the property Fortran..Libraries..Disable default library search rules to "No" and rebuild.
0 Kudos
Nick2
New Contributor I
652 Views

I'm all Fortran;

The Fortran..Libraries..Disable default library search idea worked great! Thanks :) But it begs another question:

Since the .lib project is to become a part of a console app, and a part of two dll's, which runtime library should I pick? If I pick "multithreaded" for my .lib, and "multithreaded dll" for my dll, then the dll complains,

1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library

Is this harmless enough to ignore?

0 Kudos
Steven_L_Intel1
Employee
652 Views
No, that is not safe to ignore.

I'm a bit astonished that the main project did not pull in the SVML library. What I'd recommend instead is that you turn that setting back off. In the parent project, go to the Linker property page and add under additional dependencies one of the following:

svml_disp.lib ! If using static, single threaded libraries
svml_dispmd.lib ! If using DLL libraries
svml_dispmt.lin ! If using static. multithreaded libraries

I'm inclined to call this a bug, though. I think the compiler should put out the reference to the SVML library along with other Fortran libraries. I'll ask why this isn't being done.
0 Kudos
Nick2
New Contributor I
652 Views
I fired up good old C++ and used LoadLibraryA...
Turns out the DLL was trying to load EM64Tinlibifcoremdd.dll.....
Why? Got me. I linkedmy dllagainst multithreaded rather than multithreaded dll library andnow debuggingworks
My C++ LoadLibraryA is still complaining of the same. Oh well, at least I pleased the debugger I need.
0 Kudos
Reply