Link to home
Start Free TrialLog in
Avatar of wannasmashsensation
wannasmashsensation

asked on

Linking an MFC Extension DLL in release mode

I have been working on this problem for many days. The DLL will link in debug mode, but not in release mode.

The error:

mfcs42.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in PIMMPDllCtl.obj
mfcs42.lib(dllmodul.obj) : error LNK2005: __pRawDllMain already defined in PIMMPDllCtl.obj

I can find no extraneous linkings to other modules which have a 'main' entry point either... This DLL links to an image library (static), and to the MFC libraries (shared).

Since I have just begun using the experts exchange today, I do not have many points to offer for this question, but I offer them all to you...

wannasmashsensation.
Avatar of migel
migel

Hi!
check your settings for release mode
for MFC shared DLL you have to define _AFXDL symbol
ASKER CERTIFIED SOLUTION
Avatar of migel
migel

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial