[Cmake] Compilation with MFC

Sergio Andres sergio at unizar.es
Fri Aug 27 10:25:40 EDT 2004


I added this definition using Microsoft Visual C++ 6.0 Menu: "Project", 
"Settings".
Now I managed to compile my application, but I had to remove some 
include directories
from the statement: INCLUDE_DIRECTORIES( ).
(So maybe there was a confict between some .h and 
ADD_DEFINITIONS(-DAFXDLL) ... ??)
And the AFXDLL definition appears in the MSVC++ project settings again.

Sergio

William A. Hoffman escribió:

>That is the same cmake code that builds the CMakeSetup GUI.
>You say if you add AFXDLL manually it works.  Where do you add that?
>Would this work:
>ADD_DEFINITIONS(-DAFXDLL)
>
>-Bill
>
>At 07:48 AM 8/27/2004, Sergio Andres wrote:
>  
>
>>Hi all,
>>
>>I have a CMakeLists.txt to generate a MS Visual C++ 6.0 Project with MFC.
>>The CMakeList contains the following lines:
>>
>>
>>ADD_DEFINITIONS(-D_AFXDLL)
>>SET(CMAKE_MFC_FLAG 6)
>>ADD_EXECUTABLE(VisualizationAppMDI WIN32 ${SRCS})
>>
>>but, it seems to ignore the first two, because when I try to compile the project I get the following errors:
>>
>>nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
>>nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
>>nafxcwd.lib(olelink.obj) : error LNK2001: unresolved external symbol __mbctype
>>nafxcwd.lib(dcmeta.obj) : error LNK2001: unresolved external symbol __mbctype
>>nafxcwd.lib(timecore.obj) : error LNK2001: unresolved external symbol __mbctype
>>nafxcwd.lib(apphelp.obj) : error LNK2001: unresolved external symbol __mbctype
>>nafxcwd.lib(filelist.obj) : error LNK2001: unresolved external symbol __mbctype
>>nafxcwd.lib(oledlgs1.obj) : error LNK2001: unresolved external symbol __mbctype
>>
>>And, if I add the definition (AFXDLL) manually to Project/Settings... It compiles.
>>So what is the problem??
>>
>>Thanks in advance!
>>Sergio.
>>
>>
>>_______________________________________________
>>Cmake mailing list
>>Cmake at www.cmake.org
>>http://www.cmake.org/mailman/listinfo/cmake
>>    
>>
>
>
>  
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20040827/75777eea/attachment.html


More information about the Cmake mailing list