I have a C++ interop project, which links fine with VS2003, but after
converting it to VS2005, it compiles everything withour errors/warnugs, but
I get the following linker message.
DBRDMUM.obj : error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ"
(?.cctor@@$$FYMXXZ)
I definitely don't have a method named like this, so it must be some
compiler created symbol, but I really don't know what to look for. Any
hints? Thanks a lot.
Urs
VC uses it for dynamic initialization. E.g.:
// global scope
int foo();
int i = foo();
i is initialized at load time. The compiler creates a special
function (the dynamic initializer for i). Additionally it will
emit a "/include" linker directive for the module
initializer in the object file and the /DEFAULTLIB for the
managed CRT.
When the linker sees the directive, it includes the module
initializer even if it is not otherwise referenced. It is
defined in the managed CRT.
So what you need is the correct libraries. In VC 8 it is
no longer necessary to use /NOENTRY, /NODEFAULTLIB
(linker) or /Zl (compiler) etc. Just let the tool chain figure it out.
Dumpbin /DIRECTIVES should reveal the implied
linker switches for a given object file.
If that doesn't help can you post linker warnings and
the result of dumpbin /DIRECTIVES along with
the command line switches for the linker and compiler?
-hg
Hi Holger
Thanks for your hints. Dind't really help me any farther, dumpbin
/Directoves list and build log are in the attachment.
Any tips are appreciated ... Thanks.
"Holger Grund" <holger...@remove.ix-n.net> schrieb im Newsbeitrag
news:u5UaArq9...@TK2MSFTNGP15.phx.gbl...