Error in .pro file generated by Qmake Plugin
Posted: Tue Dec 22, 2015 6:08 pm
Hi,
I am using Codelite ver.9.0.6. I have created a small "Hello world" program as qmake based project. I have configured Qt plugin to use Qt 5.5 with win32-msvc2015 specification. Now when I run the "Run Qmake" command the following .pro file as well as .mk are generated (see the attached file). When I run the generated makefile using nmake I get the following error.
MESSAGE: Entering directory `C:\sources\workspaces\testcodelite\testQmake\'
"testQmake.bat"
----------Building project:[ testQmake - Debug ]----------
Executing Pre Build commands ...
Done
Microsoft (R) Program Maintenance Utility Version 14.00.23026.0
Copyright (C) Microsoft Corporation. All rights reserved.
cl -c -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zi -MDd -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 /Fd"..\testQmake TEMPLATE = app\Debug\testQmake.pdb" -DQT_GUI_LIB -DQT_CORE_LIB -I. -I. -I..\..\..\..\ProgramFiles\MSVC14.0\VC\include -IC:\Program -IFiles -I(x86)\Windows -IKits\10\Include\10.0.10150.0\ucrt -I..\..\..\..\Qt\qt550\qtbase\include -I..\..\..\..\Qt\qt550\qtbase\include\QtGui -I..\..\..\..\Qt\qt550\qtbase\include\QtCore -I. -I..\..\..\..\Qt\qt550\qtbase\mkspecs\win32-msvc2015 -FoDebug\ @C:\Users\SRINIV~1\AppData\Local\Temp\nmCFB5.tmp
main.cpp
C:\ProgramFiles\MSVC14.0\VC\include\xlocale(341): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
.\main.cpp(3): warning C4100: 'argv': unreferenced formal parameter
.\main.cpp(3): warning C4100: 'argc': unreferenced formal parameter
C:\ProgramFiles\MSVC14.0\VC\include\exception(361): warning C4577: 'noexcept' used with no exception handling mode specified; termination on exception is not guaranteed. Specify /EHsc
link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /OUT:"..\testQmake TEMPLATE = app\Debug\testQmake.exe" @C:\Users\SRINIV~1\AppData\Local\Temp\nmD39E.tmp
LINK : fatal error LNK1104: cannot open file 'C:\Qt\qt550\qtbase\lib\Qt5Gui550.lib'
NMAKE : fatal error U1077: 'C:\ProgramFiles\MSVC14.0\VC\BIN\link.EXE' : return code '0x450'
Stop.
====2 errors, 0 warnings====
On closer inspection I found some error message in the generated .pro file which in turn causes error in generated make file.
1) In Line 18 the include options are not correct. This is caused due to the Space in the path.
2) In Line 21 the LIBPATH is shown incorrectly as Qt5Gui550.lib instead of Qt5Gui.lib
3) In the make file the destination directory is shown wrongly as - DESTDIR = "..\testQmake TEMPLATE = app\Debug\" #avoid trailing-slash linebreak
Thanks for providing help in resolving this error
Srinivasan.B
I am using Codelite ver.9.0.6. I have created a small "Hello world" program as qmake based project. I have configured Qt plugin to use Qt 5.5 with win32-msvc2015 specification. Now when I run the "Run Qmake" command the following .pro file as well as .mk are generated (see the attached file). When I run the generated makefile using nmake I get the following error.
MESSAGE: Entering directory `C:\sources\workspaces\testcodelite\testQmake\'
"testQmake.bat"
----------Building project:[ testQmake - Debug ]----------
Executing Pre Build commands ...
Done
Microsoft (R) Program Maintenance Utility Version 14.00.23026.0
Copyright (C) Microsoft Corporation. All rights reserved.
cl -c -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zi -MDd -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 /Fd"..\testQmake TEMPLATE = app\Debug\testQmake.pdb" -DQT_GUI_LIB -DQT_CORE_LIB -I. -I. -I..\..\..\..\ProgramFiles\MSVC14.0\VC\include -IC:\Program -IFiles -I(x86)\Windows -IKits\10\Include\10.0.10150.0\ucrt -I..\..\..\..\Qt\qt550\qtbase\include -I..\..\..\..\Qt\qt550\qtbase\include\QtGui -I..\..\..\..\Qt\qt550\qtbase\include\QtCore -I. -I..\..\..\..\Qt\qt550\qtbase\mkspecs\win32-msvc2015 -FoDebug\ @C:\Users\SRINIV~1\AppData\Local\Temp\nmCFB5.tmp
main.cpp
C:\ProgramFiles\MSVC14.0\VC\include\xlocale(341): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
.\main.cpp(3): warning C4100: 'argv': unreferenced formal parameter
.\main.cpp(3): warning C4100: 'argc': unreferenced formal parameter
C:\ProgramFiles\MSVC14.0\VC\include\exception(361): warning C4577: 'noexcept' used with no exception handling mode specified; termination on exception is not guaranteed. Specify /EHsc
link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /OUT:"..\testQmake TEMPLATE = app\Debug\testQmake.exe" @C:\Users\SRINIV~1\AppData\Local\Temp\nmD39E.tmp
LINK : fatal error LNK1104: cannot open file 'C:\Qt\qt550\qtbase\lib\Qt5Gui550.lib'
NMAKE : fatal error U1077: 'C:\ProgramFiles\MSVC14.0\VC\BIN\link.EXE' : return code '0x450'
Stop.
====2 errors, 0 warnings====
On closer inspection I found some error message in the generated .pro file which in turn causes error in generated make file.
1) In Line 18 the include options are not correct. This is caused due to the Space in the path.
2) In Line 21 the LIBPATH is shown incorrectly as Qt5Gui550.lib instead of Qt5Gui.lib
3) In the make file the destination directory is shown wrongly as - DESTDIR = "..\testQmake TEMPLATE = app\Debug\" #avoid trailing-slash linebreak
Thanks for providing help in resolving this error
Srinivasan.B