Error in Release build but not Debug build 
Author Message
 Error in Release build but not Debug build

Hello,

I have an application call AAA, and a dll call BBB.  AAA depends on BBB.
In BBB I exported a class call CCC using AFX_CLASS_EXT in front of the
class name.  In CCC I used DECLARE_MESSAGE_MAP() macro, which has AFX_DATA
in front of messageMap() function.  It works great in Debug build, but does
not work in Release build.  Can anybody tell me why the function
messageMap() in the macro does not get exported correctly only in Release
build?

Here is the error message:

SdMultiInputDLG.obj : error LNK2001: unresolved external symbol "protected:
static struct AFX_MSGMAP const  CSDB_SdMultiInputDLG::messageMap"

Release/sdbfdnw.exe : fatal error LNK1120: 1 unresolved externals

Thanks in advance; I will really appreciate any suggestion!

--Mei



Fri, 02 Mar 2001 03:00:00 GMT  
 Error in Release build but not Debug build
in your AAA which uses the DLL, make sure you do NOT have _AFXEXT defined in
the preprocessor (Project..Settings). Also, make sure that in your BBB dll,
you have _AFXEXT ad _AFXDLL defined in the preprocessor.
Quote:

>Hello,

>I have an application call AAA, and a dll call BBB.  AAA depends on BBB.
>In BBB I exported a class call CCC using AFX_CLASS_EXT in front of the
>class name.  In CCC I used DECLARE_MESSAGE_MAP() macro, which has AFX_DATA
>in front of messageMap() function.  It works great in Debug build, but does
>not work in Release build.  Can anybody tell me why the function
>messageMap() in the macro does not get exported correctly only in Release
>build?

>Here is the error message:

>SdMultiInputDLG.obj : error LNK2001: unresolved external symbol "protected:
>static struct AFX_MSGMAP const  CSDB_SdMultiInputDLG::messageMap"

>Release/sdbfdnw.exe : fatal error LNK1120: 1 unresolved externals

>Thanks in advance; I will really appreciate any suggestion!

>--Mei



Sun, 04 Mar 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Protection Violation in Release Build but not in Debug Build

2. Q: Dialog Tooltips work in DEBUG build but not under RELEASE Build

3. VC6 Debug Build Works Fine - but Release Build Gives Error

4. Debug build breaks, Release build ok

5. Debug Build vs. Release Build

6. Debug Build works Release build doesn't?

7. Debug build works correctly but release build doesnt (sometimes)

8. Debug build works, release build crashes!

9. Message Handler on Release build and debug build

10. Differences between release builds and debug builds?

11. Debug build breaks, Release build ok.

12. Worker Thread and MDI app - Release Build dies but Debug Build OK

 

 
Powered by phpBB® Forum Software