QT Won't build anything (using VS2015) - c++

So I installed QT and I had already installed Visual Studio 2015 and 2017
Here is the error:
C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:debug\test.exe #C:\Users\pc\AppData\Local\Temp\test.exe.3864.0.jom
'link' is not recognized as an internal or external command,
operable program or batch file.
jom: C:\Users\pc\Desktop\QT\build-test-Desktop_Qt_5_9_1_MSVC2013_64bit-Debug\Makefile.Debug [debug\test.exe] Error 1
jom: C:\Users\pc\Desktop\QT\build-test-Desktop_Qt_5_9_1_MSVC2013_64bit-Debug\Makefile [debug] Error 2
18:25:04: The process "C:\Qt\Tools\QtCreator\bin\jom.exe" exited with code 2.
Error while building/deploying project test (kit: Desktop Qt 5.9.1 MSVC2013 64bit)
The kit Desktop Qt 5.9.1 MSVC2013 64bit has configuration issues which might be the root cause for this problem.
When executing step "Make"
And here is my environment kits QtVersion 5.9.1 MSVC2013 auto detected and Manual 5.6.2 Compiler debugger and CMake are empty.
I run on a windows 7 enterprise 64bits

Related

Boost build fails to generate visual studio manifest file

I'm attempting to build Boost from source and running into an odd issue. Some Windows machines can compile this just fine and others fail even though they're all running the same version of Visual Studio. This worked on all machines using Boost 1.62 but is failing with Boost 1.72.
Here's the Boost build command:
b2 -j${num_processors} -d 0 --layout=versioned architecture=x86 address-model=64 threading=multi
link=shared runtime-link=shared toolset=msvc-14.0 --with-system --with-thread --with-date_time
--with-chrono --with-filesystem --with-atomic variant=debug --prefix=${boost_dir} install
The issue seems to be that Boost Thread isn't getting configured properly such that the project's .MANIFEST file is not generated. Here's the error output (see last line):
> bin.v2\libs\headers\build\install\boost_headers-config.cmake
> 1 file(s) copied.
> msvc.link.dll bin.v2\libs\thread\build\msvc-14.0\debug\address-model-64\threadapi-win32\threading-multi\boost_thread-vc140-mt-gd-x64-1_72.dll
>
> call "bin.v2\standalone\msvc\msvc-14.0\address-model-64\architecture-x86\msvc-setup.bat" amd64 >nul
> link /NOLOGO /INCREMENTAL:NO /DLL /DEBUG /MACHINE:X64 /MANIFEST /subsystem:console /out:"bin.v2\libs\thread\build\msvc-14.0\debug\address-model-64\threadapi-win32\threading-multi\boost_thread-vc140-mt-gd-x64-1_72.dll"
/IMPLIB:"bin.v2\libs\thread\build\msvc-14.0\debug\address-model-64\threadapi-win32\threading-multi\boost_thread-vc140-mt-gd-x64-1_72.lib"
#"bin.v2\libs\thread\build\msvc-14.0\debug\address-model-64\threadapi-win32\threading-multi\boost_thread-vc140-mt-gd-x64-1_72.dll.rsp"
> if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%
>
> Creating library bin.v2\libs\thread\build\msvc-14.0\debug\address-model-64\threadapi-win32\threading-multi\boost_thread-vc140-mt-gd-x64-1_72.lib
and object bin.v2\libs\thread\build\msvc-14.0\debug\address-model-64\threadapi-win32\threading-multi\boost_thread-vc140-mt-gd-x64-1_72.exp
>LINK : fatal error LNK1104: cannot open file 'bin.v2\libs\thread\build\msvc-14.0\debug\address-model-64\threadapi-win32\threading-multi\boost_thread-vc140-mt-gd-x64-1_72.dll.manifest'
Any ideas what would trigger this or suggestions on what I can investigate further?
EDIT: We're building this on Windows 10 using Visual Studio 2015.
For posterity, the team upgraded to Visual Studio 2019. This at least worked around the issue for most of us. A few folks still have issues.

Crypto++ build with msvc /MDd cryptlib.lib Can't find cryptopp.lib when linking

I built the last available version of the library (5.6.5) wanting to use it in a Qt msvc project. The issue is, that the linker want's for some reason the cryptopp.lib that is produced when building the fips dll.
This is my config (only the relevant):
INCLUDEPATH += $$PWD/thirdparty/Win/cryptopp/include
LIBS += -L$$PWD/thirdparty/Win/cryptopp/debug/ -lcryptlib
The compiler output:
LINK : fatal error LNK1104: cannot open file 'cryptopp.lib'
EDIT:
The link command + the result: Which the result is the same as above.
link /NOLOGO /DYNAMICBASE /NXCOMPAT /NODEFAULTLIB:MSVCRT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:debug\QtTrafficBrowser.exe #C:\Users\Mij\AppData\Local\Temp\QtTrafficBrowser.exe.1316.6203.jom
LINK : fatal error LNK1104: cannot open file 'cryptopp.lib'
jom: C:\Users\Mij\qt_creator\qtTrafficBrowser\build-QtTrafficBrowser-Desktop_Qt_5_8_0_MSVC2015_32bit-Debug\Makefile.Debug [debug\QtTrafficBrowser.exe] Error 1104
jom: C:\Users\Mij\qt_creator\qtTrafficBrowser\build-QtTrafficBrowser-Desktop_Qt_5_8_0_MSVC2015_32bit-Debug\Makefile [debug] Error 2
I am not trying to use the DLL!! I know it's different and I knew it from the start so stop asking me not to use it. The problem is that when linking with cryptlib.lib the linker asks for cryptopp.lib also. Is it clear?
I was dumb.
I added the dll.h into my project, that's why it was asking for the cryptopp.lib.
Removed it, and boom, works.
People having a similar issue, look at this also. LNK1104 Cryptopp.lib with CRYPTOPP_DEFAULT_NO_DLL defined in dll project

Building QtWebKit with QT 5.6 on Windows

I'm trying to compile QtWebkit with VS2015, QT 5.6 itself builds fine. Since webkit module was removed in 5.6 I reverted revision
SHA-1: 4116ec2474e608c9a752ace5e8eb92cbd4052ebc "* Removed QtWebkit and QtWebkit-Examples from qt5.git" so I can get webkit module downloaded when I run "init-repository". However while building, I'm getting a linker error which does not make any sense:
link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:..\..\bin\jsc.exe #C:\Users\PAVLOD~1\AppData\Local\Temp\nmA33.tmp
LINK : fatal error LNK1181: cannot open input file '\OPT:REF.obj'
I had no problem building QtWebkit with QT 5.5.1. Something has changed in 5.6 which prevents it being built out of the box. Most likely I've got my dependencies wrong. How would I even begin debugging a problem? I tried running that command manually, but it complained that it couldn't find .tmp file. I assume that build scripts generate temp files for something then deletes them.
The file it tried to link I think is related to jsc.cpp, because it's what it tried to compile right before linking.
I've tried to reproduce and got the same error, but in my case linker call look like
link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /OPT:REF /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:..\..\bin\jsc.exe #D:\Temp\_system\nmB77B.tmp
LINK : fatal error LNK1181: cannot open input file '\OPT:REF.obj'
Here we have /OPT:REF linker argument that is somehow treatened as an input file. You can try to change this parameter in build configuration and see what happens. Good luck)

Cannot open file glu32.lib

I created a new project in my Qt 5.4.1 opengl 64 bit. When i tried to build and run my project, I get LINK 1104: cannot open file glu32.lib. I searched my entire pc but i couldn't find glu32.lib file anywhere neither I could find opengl32.lib. I am very new to Qt so, even in Kits I have this Desktop opengl 64bit automatically detected, but side of this it has exclamatory icon. Do everyone has this icon or I have made some error?
This is error in Compile Output section
11:27:17: Running steps for project untitled20...
11:27:17: Configuration unchanged, skipping qmake step.
11:27:17: Starting: "C:\Qt\Qt5.4.1\Tools\QtCreator\bin\jom.exe"
C:\Qt\Qt5.4.1\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:debug\untitled20.exe #C:\Users\jas\AppData\Local\Temp\untitled20.exe.4652.94.jom
LINK : fatal error LNK1104: cannot open file 'glu32.lib'
jom: C:\Users\jas\Documents\build-untitled20-Desktop_Qt_5_4_1_MSVC2013_OpenGL_64bit-Debug\Makefile.Debug [debug\untitled20.exe] Error 1104
jom: C:\Users\jas\Documents\build-untitled20-Desktop_Qt_5_4_1_MSVC2013_OpenGL_64bit-Debug\Makefile [debug] Error 2
11:27:20: The process "C:\Qt\Qt5.4.1\Tools\QtCreator\bin\jom.exe" exited with code 2.
Error while building/deploying project untitled20 (kit: Desktop Qt 5.4.1 MSVC2013 OpenGL 64bit)
When executing step "Make"
11:27:20: Elapsed time: 00:03.
Can you search for all the places in your computer where you have glu32.lib? The problem you are facing could be due to 2 reasons:
The default location where Qt is looking for glu32.lib may not have it (less likely)
The default location where Qt is looking for glu32.lib may have spaces in its path name.

Linking issue in QtCreator on Windows

I need to use port audio in QtCreator. But i can't make the link work.
I have a very simple main:
#include "portaudio.h"
#include <iostream>
int main(int, char *[])
{
std::cout << Pa_GetErrorText(0) << std::endl;
return 0;
}
Il put this snippet in a folder with portaudio.lib.
In Visual Studio 2012, it compile and excute well (after adding the include path and the library).
In QtCreator, i try to add to the .pro:
LIBS += -L$$PWD -lportaudio
or:
LIBS += $$PWD/portaudio.lib
So, i'm a litle lost. I'm not very familiar with windows build environement.
I add the compile output.
link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST /MANIFESTFILE:debug\test_portaudio.exe.embed.manifest /OUT:debug\test_portaudio.exe
#C:\Users\victor\AppData\Local\Temp\test_portaudio.exe.7044.16.jom
main.obj : error LNK2019: external symbol Pa_GetErrorText referenced in function main
debug\test_portaudio.exe : fatal error LNK1120: 1 externes non résolus
jom: C:\Users\victor\Documents\build-test_portaudio-Desktop_Qt_5_2_0_MSVC2012_64bit-Debug\Makefile.Debug [debug\test_portaudio.exe] Error 1120
jom: C:\Users\victor\Documents\build-test_portaudio-Desktop_Qt_5_2_0_MSVC2012_64bit-Debug\Makefile [debug] Error 2
09:05:25: The process "C:\Qt\Tools\QtCreator\bin\jom.exe" exited with code 2.
Error while building/deploying project test_portaudio (kit: Desktop Qt 5.2.0 MSVC2012 64bit)
When executing step 'Make'
Thanks for your help,
Vhb
EDIT:
Here is the .pro file:
QT += core
QT -= gui
TARGET = test_portaudio
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
INCLUDEPATH += $$PWD/../portaudio/include
LIBS += -L$$PWD -lportaudio
SOURCES += main.cpp
The manifest file:
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*' />
</dependentAssembly>
</dependency>
</assembly>
I'm working on qt 5.2.0 with qtCreator 3.0 and Visual Studio 2012.
Your linker command does not seem to have realized the changes:
link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='' processorArchitecture=''" /MANIFEST /MANIFESTFILE:debug\test_portaudio.exe.embed.manifest /OUT:debug\test_portaudio.exe
As you can see, there is no reference in there to the portaudio library. It is not surprising that you are getting an undefined reference, then.
You probably forgot to rerun qmake by using the execute qmake option explicitly. Once that is done, it will work.
It is hard to tell more without providing more context, but you could also double check this operation from the command line by using qmake. It works here.