[Cmake] CMake and MFC-based Program

William A. Hoffman billlist at nycap.rr.com
Sat Aug 28 23:07:41 EDT 2004


I have never seen that problem.  My guess is you are linking some other
library that is pulling in the release version of mfc into the debug build.
CMakeSetup is built using the way the FAQ works. 

At 10:04 PM 8/28/2004, Bing Jian wrote:
>Hi William,
>
>   Thanks a lot. I tried the way in the FAQ, it works,  but only for release mode.
>In debug mode, I am still getting errors like:
> nafxcwd.lib(thrdcore.obj) : error LNK2005:
>"public: virtual void __thiscall CWinThread::Delete(void)" (?Delete at CWinThread@@UAEXXZ) already defined in mfc42d.lib(MFC42D.DLL)
>.... 
>   Is there anything else I need to pay attention to in the CMakeLists.txt?
>
>
>
>>See this FAQ entry:
>>
>>http://public.kitware.com/Wiki/CMake_FAQ#How_to_use_MFC_with_CMake
>>
>>At 11:38 PM 8/27/2004, Bing Jian wrote:
>> 
>>
>>>Hi, there,
>>>
>>>   Here is a question about CMake and MFC-based program.  I have the workspace created
>>>manually inside visual studio.  Now I want to generate the project file automatically by CMake.
>>>Seems the default configuration for the project generated by CMake is "Not Using MFC",
>>>I am asking how to enable it in CMakeLists.txt. Now I just modified it manually, but still get
>>>following error
>>> error LNK2001: unresolved external symbol _main
>>>Is it because Visual Studio treats it as console project.?
>>> Any helps? Many thanks in advance!
>>>
>>>
>>>-- Best wishes,
>>>Bing Jian
>>>bjian at cise.ufl.edu
>>>
>>>
>>>_______________________________________________
>>>Cmake mailing list
>>>Cmake at www.cmake.org
>>>http://www.cmake.org/mailman/listinfo/cmake
>>>   
>>
>> 
>
>
>-- 
>Best wishes,
>Bing Jian
>bjian at cise.ufl.edu
>
>
>_______________________________________________
>Cmake mailing list
>Cmake at www.cmake.org
>http://www.cmake.org/mailman/listinfo/cmake



More information about the Cmake mailing list