[CMake] Program with Qt opening with a bash screen on windows before showing the gui...

Renato Utsch renatoutsch at gmail.com
Wed Nov 30 18:51:18 EST 2011


Hello CMake guys...

Well, I was writing a portable program using CMake that uses Qt as it's GUI
framework...

I compiled it on linux and it worked really well, no problems. But when
compiling on Windows, the program opened a blank bash screen before opening
the proper gui. I thought that this could be with Qt itself, but when I
tried with qmake, the program runned normally, without any bash screen
opening...

I used the Visual C++ Express 2008 to compile, with Qt libraries 4.7.4 for
the Visual 2008. Here is the CMakeLists.txt:

project(test CXX)
cmake_minimum_required(VERSION 2.8)
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
set(test_SRCS
    main.cpp
    MainWindow.cpp
)
set(test_MOC_SRCS
    MainWindow.hpp
)

set(test_RCCS
    rc.qrc
)
qt4_wrap_cpp(test_MOCS ${test_MOC_SRCS})
qt4_add_resources(test_RCC_SRCS ${test_RCCS})
add_definitions(-DQT_NO_DEBUG)
add_executable(test
    ${test_SRCS}
    ${test_MOCS}
    ${test_RCC_SRCS})
target_link_libraries(test ${QT_LIBRARIES})

If there is any solution to this I would be very grateful, because I really
want to use CMake.


Thanks!


Renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20111130/e40fecdc/attachment.htm>


More information about the CMake mailing list