[CMake] add_executable and WIN32 option
Alin M Elena
alin.elena at qub.ac.uk
Thu Apr 10 05:16:23 EDT 2008
Hi
I try to use WIN32 option with cmake 2.6 rc6
I added it in the add_executable
+
if(WIN32)
ADD_DEFINITIONS(-D_AFXDLL)
set(CMAKE_MFC_FLAG 2)
endif(WIN32)
in the CMakeLists.txt what I get is a linking error
Linking CXX executable bin\aten.exe
"C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe
C:\PROGRA~1\MICROS~2\VC\bin\cl.exe /nologo @CMakeFiles\at
en.dir\objects.rsp @C:\Users\ALINME~1\AppData\Local\Temp\nm7ED.tmp
Visual Studio Non-Incremental Link
LINK:
C:\PROGRA~1\MICROS~2\VC\bin\cl.exe /nologo
CMakeFiles\aten.dir\src\main.cpp.obj /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc
/GR
/MD /O2 /Ob2 /D NDEBUG /Febin\aten.exe /FdC:\Users\Alin M
Elena\test\bin\aten.pdb -link /implib:bin\aten.lib /version:0
.0 /MANIFEST /STACK:10000000 /machine:I386 /INCREMENTAL:NO
/subsystem:windows lib\gui.lib lib\base.lib lib\command.lib l
ib\render.lib lib\methods.lib lib\model.lib lib\sg.lib lib\parse.lib
lib\classes.lib lib\energy.lib lib\fourier.lib lib\
math.lib C:\qt\lib\QtOpenGL4.lib glu32.lib opengl32.lib C:\qt\lib\QtGui4.lib
C:\qt\lib\QtCore4.lib C:\Users\Alin M Elena
\extras\lib\readline.lib kernel32.lib user32.lib gdi32.lib winspool.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib comd
lg32.lib advapi32.lib
MSVCRT.lib(crtexew.obj) : error LNK2019: unresolved external symbol
_WinMain at 16 referenced in function ___tmainCRTStartu
p
bin\aten.exe : fatal error LNK1120: 1 unresolved externals
LINK failed. with 2
NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' : return
code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
8\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
8\VC\BIN\nmake.exe"' : return code '0x2'
The same error if I set the MFC_FLAG 1
Any thoughts?
Alin
____________________________________________________________________
"...if the universities will not study useless subjects, who will?"
G. F. Fitzgerald, Nature, 45/46, 392 (1892)
______________________________________________________________________
Mr. Alin M. ELENA
Atomistic Simulation Centre
School of Mathematics and Physics
Queen's University Belfast
Office: +44 (0)28 9097 1428
Fax: +44 (0)28 9097 5359
http://titus.phy.qub.ac.uk/group/Alin/
alin.elena at yahoo.co.uk
alin.elena at qub.ac.uk
______________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080410/e2fc5ce0/attachment-0001.htm>
More information about the CMake
mailing list