Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!
all groups > visual c > february 2004 >

visual c : Mixed Mode DLL Issue (Need Help now!!)


Paul Brun
2/19/2004 11:28:14 AM
Hello everyone,

I have tried all the solutions trying to figure out how to remedy my =
mixed mode DLL solution,
however, I still can't get the project to compile. I have tried all the =
solutions managed in the=20
Microsoft Knowledgebase article, but I get the following issues:

libcmt.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in =
msvcrt.lib(cinitexe.obj)
libcmt.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in =
msvcrt.lib(cinitexe.obj)
libcmt.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in =
msvcrt.lib(cinitexe.obj)
libcmt.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in =
msvcrt.lib(cinitexe.obj
libcmt.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter already =
defined in msvcrt.lib(MSVCR71.dll)
libcmt.lib(crt0.obj) : error LNK2005: __amsg_exit already defined in =
msvcrt.lib(MSVCR71.dll)
libcmt.lib(crt0.obj) : error LNK2019: unresolved external symbol _main =
referenced in function _mainCRTStartup

D:\Mitel-Development\MiTAI.NET\MitaiNET\Release\MitaiNET.dll : fatal =
error LNK1120: 1 unresolved externals

And my original issue involving the last line "unresolved external =
symbol _main...bla..." is still causing me problems.

Any hints.

Thanks

Olaf.Baeyens NO[at]SPAM skyscan.be
2/20/2004 1:24:13 PM
[quoted text, click to view]
I discovered that static linking of the MFC could cause something similar
like this.
I had to recompile with MFC in DLL instead of static.

franklopez2000 NO[at]SPAM yahoo.com
2/20/2004 2:52:27 PM
[quoted text, click to view]

If you put your unmanaged C++ code in a pure unmanaged DLL (separate
project), a static link with MFC appears to be holding up just fine on
this side.

This approach uses the managed-to-unmanaged C++ class mappings within
a project just focused on that: a proxy layer DLL. The proxy
AddThis Social Bookmark Button