[Cmake] Compilation with MFC

William A. Hoffman billlist at nycap.rr.com
Fri Aug 27 09:38:53 EDT 2004


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



More information about the Cmake mailing list