Hi all,
I created GUI Application Exe . If I run the exe . One command prompt is comming with
this in Windows. How to avoid this Command prompt window ?
Hi all,
I created GUI Application Exe . If I run the exe . One command prompt is comming with
this in Windows. How to avoid this Command prompt window ?
Thanks,
Rajesh.S
If you are using MinGW then refer to
http://www.mingw.org/docs.shtml
http://www.allegro.cc/forums/print-thread/594895
Yogesh M
http://sparklemedia.sourceforge.net/
I am using VS compiler
Thanks,
Rajesh.S
Do you use a .pro file? If so, remove CONFIG+=console from it. If not, access your Qt VS integration module and disable the console there.
I am using cmake to compile my application .
Thanks,
Rajesh.S
Then read cmake ml or documentation
http://www.cmake.org/pipermail/cmake...ch/020572.html
I added WIN32 in ADD_EXECUTABLE of CMake
But I am getting the following error,
error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
Thanks,
Rajesh.S
Did you forgot to add QT_QTMAIN_LIBRARY to target_link_libraries ?
Make clean (or at least delete main.o) and rebuild. Sources haven't changed so you need to force a rebuild by hand.
J-P Nurmi
I did clean and then build ,still i am getting same error.
I am suspecting my main implementation,
i am using main like below,
Qt Code:
int main(int argc,char* argv[]) { MyMainWindow mainWnd; mainWnd.show(); return myApp.exec(); }To copy to clipboard, switch view to plain text mode
MyMainWindow is derived from QMainWindow.
Is my main implementation correct ?
Last edited by wysota; 26th March 2008 at 08:11. Reason: missing [code] tags
Thanks,
Rajesh.S
Yes, it's fine. Your project file has to be incorrect.
Now I solved by adding following Lines in the CMakeLists.txt File.
IF(WIN32)
LINK_LIBRARIES(
${QT_QTMAIN_LIBRARY}
)
ENDIF(WIN32)
IF(WIN32)
ADD_DEFINITIONS(-DQT_DLL)
ENDIF(WIN32)
and then ,
WIN32 in ADD_EXUCUTABLE
Thanks,
Rajesh.S
No need to add this for WIN32 only. ${QT_QTMAIN_LIBRARY} is just empty on linux and QT_DLL is ignored (why do you need it at all?)
rajeshs (27th March 2008)
Bookmarks