[BUG] VS 2005 and MFC Extension DLL with /CLR

B

bonk

When I try to compile a MFC extension dll with /CLR in VS 2005 Beta 2. I
get the following link errors:

LNK2005: error _DLLMain@12 already defined in MyMFCDll.obj File:
mfcs80ud.lib
LNK2005: error _pRawDllmain already defined in MyMFCDll.obj File:
mfcs80ud.lib

Google seems to hint that this is a bug in VS 2005 beta 2 wizard.
Unfortuantely I am not able to switch to a later build since I am using
WPF (formerly known as Avalon) wich only works with VS 2005 beta 2 and
it doesn't look like there will be a version that works with vs 2005
final anytime soon.
So is there a way to wor around this issue and get rid of this error ?
 
B

bonk

bonk said:
When I try to compile a MFC extension dll with /CLR in VS 2005 Beta 2. I
get the following link errors:

LNK2005: error _DLLMain@12 already defined in MyMFCDll.obj File:
mfcs80ud.lib
LNK2005: error _pRawDllmain already defined in MyMFCDll.obj File:
mfcs80ud.lib

Google seems to hint that this is a bug in VS 2005 beta 2 wizard.
Unfortuantely I am not able to switch to a later build since I am using
WPF (formerly known as Avalon) wich only works with VS 2005 beta 2 and
it doesn't look like there will be a version that works with vs 2005
final anytime soon.
So is there a way to wor around this issue and get rid of this error ?
I found a coment about it in this bugtrack:

http://lab.msdn.microsoft.com/produ...edbackid=60df170e-cf8d-4d75-8434-54741ae3f773

it says:

"This is a wizard code gen bug which we have fixed in our latest code.
DllMain needs to be in its own unmanaged source file."

how could I do that (correct what the codegen wizard did wrong) ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top