wiki:FAQ_general_tips

Contents

  1. FAQ -- common tips
    1. Execution of an application without displaying a command prompt in Microsoft Windows using CMake

FAQ -- common tips

Execution of an application without displaying a command prompt in Microsoft Windows using CMake

Solution

Add in your CMakeLists.txt :

IF(WIN32)
	LINK_LIBRARIES(${QT_QTMAIN_LIBRARY})
	SET(GUI_TYPE WIN32)
ENDIF(WIN32)
...
ADD_EXECUTABLE(${PROJECT_NAME} ${GUI_TYPE} ${PROJECT_SRCS} ${PROJECT_MOC_SRCS} ${PROJECT_UI_SRCS})
Last modified 10 years ago Last modified on Nov 28, 2014, 10:33:06 AM
Note: See TracWiki for help on using the wiki.