[Cmake] CMake and MFC-based Program

Bing Jian bjian at cise.ufl.edu
Sat Aug 28 22:04:19 EDT 2004


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




More information about the Cmake mailing list