View Full Version : why debug console continue appear?
banlinhtienphong
26th April 2011, 08:02
I set CMAKE_EXE_LINKER_FLAG in CMakeLists.txt follow:
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
message(${CMAKE_EXE_LINKER_FLAGS})
result:
message is /STACK:10000000 /machine:X86 /SUBSYSTEM:WINDOWS
but debug console window continue appear.
I want debug console window disappear.Help me.Thank in advance!
mcosta
26th April 2011, 08:31
In yout CMakeLists.txt use
add_executable (<exe_name> WIN32 <sources>)
or
set_target_properties (<exe_name> PROPERTIES
WIN32_EXECUTABLE TRUE
)
banlinhtienphong
26th April 2011, 10:32
I try but result still not change.Follow is cmakelists.txt.Help me!!!
http://www.mediafire.com/?c8ce815tv1km7ws
mcosta
27th April 2011, 11:59
Which compiler do you use?
With MinGW it works fine with
project(PRJ)
cmake_minimum_required(VERSION 2.8)
set(EXE_NAME prj)
set (prj_SRC
main.cpp
)
add_executable(${EXE_NAME} ${prj_SRC})
set_target_properties(
${EXE_NAME}
PROPERTIES
WIN32_EXECUTABLE TRUE
)
When I set WIN32_EXECUTABLE to TRUE I obtain (make VEBOSE=1) this
C:\MinGW\bin\g++.exe -g -mwindows -Wl,--whole-archive CMakeFiles\prj.dir/objects.a -Wl,--no-whole-archive -o prj.exe -Wl,--out-implib,libprj.dll.a
-Wl,--major-image-version,0,--minor-image-version,0 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
with WIN32_EXECUTABLE to FALSE the result is
C:\MinGW\bin\g++.exe -g -Wl,--whole-archive CMakeFiles\prj.dir/objects.a -Wl,--no-whole-archive -o prj.exe -Wl,--out-implib,libprj.dll.a
-Wl,--major-image-version,0,--minor-image-version,0 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
banlinhtienphong
27th April 2011, 13:03
I use vs2005 and cmake 2.8.Normally, when I use as above, debug console disappear.But with this project I cannot understand why.
Can you see http://www.mediafire.com/?c8ce815tv1km7ws to assist me?
Thank in advance
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.