[Cmake] Compilation with MFC
Sergio Andres
sergio at unizar.es
Fri Aug 27 07:48:30 EDT 2004
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.
More information about the Cmake
mailing list