Results 1 to 5 of 5

Thread: why debug console continue appear?

  1. #1
    Join Date
    Nov 2010
    Posts
    31
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Question why debug console continue appear?

    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!

  2. #2
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: why debug console continue appear?

    In yout CMakeLists.txt use
    Qt Code:
    1. add_executable (<exe_name> WIN32 <sources>)
    To copy to clipboard, switch view to plain text mode 

    or

    Qt Code:
    1. set_target_properties (<exe_name> PROPERTIES
    2. WIN32_EXECUTABLE TRUE
    3. )
    To copy to clipboard, switch view to plain text mode 
    A camel can go 14 days without drink,
    I can't!!!

  3. #3
    Join Date
    Nov 2010
    Posts
    31
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: why debug console continue appear?

    I try but result still not change.Follow is cmakelists.txt.Help me!!!
    http://www.mediafire.com/?c8ce815tv1km7ws

  4. #4
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: why debug console continue appear?

    Which compiler do you use?

    With MinGW it works fine with
    Qt Code:
    1. project(PRJ)
    2.  
    3.  
    4. cmake_minimum_required(VERSION 2.8)
    5.  
    6. set(EXE_NAME prj)
    7.  
    8. set (prj_SRC
    9. main.cpp
    10. )
    11.  
    12. add_executable(${EXE_NAME} ${prj_SRC})
    13.  
    14. set_target_properties(
    15. ${EXE_NAME}
    16. PROPERTIES
    17. WIN32_EXECUTABLE TRUE
    18. )
    To copy to clipboard, switch view to plain text mode 

    When I set WIN32_EXECUTABLE to TRUE I obtain (make VEBOSE=1) this
    Qt Code:
    1. 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
    2. -Wl,--major-image-version,0,--minor-image-version,0 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
    To copy to clipboard, switch view to plain text mode 

    with WIN32_EXECUTABLE to FALSE the result is

    Qt Code:
    1. 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
    2. -Wl,--major-image-version,0,--minor-image-version,0 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
    To copy to clipboard, switch view to plain text mode 
    A camel can go 14 days without drink,
    I can't!!!

  5. The following user says thank you to mcosta for this useful post:

    banlinhtienphong (27th April 2011)

  6. #5
    Join Date
    Nov 2010
    Posts
    31
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: why debug console continue appear?

    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

Similar Threads

  1. QtCreator debug in console mode
    By stef13013 in forum Qt Tools
    Replies: 0
    Last Post: 8th February 2011, 15:34
  2. Replies: 13
    Last Post: 26th January 2011, 16:11
  3. How to forward console debug data
    By Nik8768 in forum Qt Programming
    Replies: 1
    Last Post: 27th April 2010, 19:15
  4. Qt nmake error - can I continue with build?
    By QPlace in forum Installation and Deployment
    Replies: 0
    Last Post: 7th April 2009, 18:18
  5. How to wait 2 seconds before continue
    By raphaelf in forum Newbie
    Replies: 3
    Last Post: 25th June 2008, 14:36

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.