[CMake] _USRDLL issue with Extension DLLs in MSVC6.0

shabelnikov at secu-3.org shabelnikov at secu-3.org
Wed Dec 28 10:52:19 EST 2011


Hello All,

I faced issue with Visual Studio 6.0 project (.dsp) produced by CMake.
CMake version: 2.8.6
Project type: Extension DLL
Issue: CMake adds _USRDLL define for Extension DLLs (_AFXDLL and 
_AFXEXT are defined). According to documentation 
(http://msdn.microsoft.com/en-us/library/aa235516%28v=vs.60%29.aspx) 
_USRDLL must not be defined for Extension DLLs (when _AFXDLL is 
defined). This behavior leads to linker errors.
Solution that I see: exclude _USRDLL symbol when _AFXDLL & _AFXEXT 
symbols are defined.

Additionally:
I've also tested my project with Visual Studio 9 and it works OK;
I've tried several ways to make CMake do not add mentioned symbol to 
produced project but without success;
I've checked CMake 2.8.6 source code and found that _USRDLL symbol 
persists in DLLHeader.dsptemplate project template.

p.s. I've searched documentation, FAQ, ChangeLog.txt and web for this 
issue and haven't found answer.

Best Regards,
Alexey Shabelnikov


More information about the CMake mailing list