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

Dependencies on debug versions of DLLs in Release configuration

Arjen_Markus
Honored Contributor II
528 Views
Hello,

I have run into a curious and ultimately nasty problem building a DLL:
When I build using the Release configuration I get a DLL that depends on such libraries
as libifcoremd.dll and others - even though I did not change any default options wrt
the runtime libraries and so on.

I have checked the properties of the project, but I can not find the reason for
these dependencies. In the object files I clearly see default libraries such as libifcoremd.dll,
but in a very similar project I do not see them.

Any idea what I can do about this?

Here are some details:
- I am using Developer Studio 2008 with Intel Fortran 11.1
- The error message during linking is:

libifcoremd.lib(for_main.obj) : error LNK2001: unresolved external symbol _MAIN__

..\\..\\bin\\Release\\dlwqlib.dll : warning LNK4088: image being generated due to /FORCE option; image may not run

The DLL is produced, however, and the summary says the project was successfully built
(even though two errors are reported).


Regards,

Arjen
0 Kudos
2 Replies
Steven_L_Intel1
Employee
528 Views
libifcoremd.lib is not a debug library. But it seems your project is building as a console application. I suggest you carefully compare the project options between the two confiigurations.
0 Kudos
Arjen_Markus
Honored Contributor II
528 Views

Ah, it was the trailing "d" that made me think that.

I found the cause though, after, indeed, a careful inspection of the options in both projects: we were using the /force option to force a DLL. Without it we got errors about duplicate symbols in msvcrt.lib. By removing
the /force option and ignoring msvcrt.lib it now works without any complaints.

Regards,

Arjen

0 Kudos
Reply