Building QtWebKit with QT 5.6 on Windows - c++

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)

Related

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

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.

Linker error: cannot link to '&.obj'

I am trying to compile a qt project under windows (it builds just fine on linux), but keep getting uncomprehensible linker error:
link /LIBPATH:"c:\Qt\4.8.4\lib" /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /MANIFEST /MANIFESTFILE:"debug\LPR_Demo.intermediate.manifest" /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /OUT:debug\LPR_Demo.exe #C:\Users\User\AppData\Local\Temp\LPR_Demo.exe.1936.4150.jom
LINK : fatal error LNK1104: cannot open file '&.obj'
I have no idea what &.obj might be and why in the world linker would need it. Googling gives me notheing on the subject.
How could i resolve this situation?
Don't use back slashes in your .pro file. Switch them to forward slashes.
Hope that helps.

Linking with Boost error

I just downloaded and ran the boost installer for version 1.42 (from boostpro.com), and set up my project according to the getting started guide. However, when I build the program, I get this linker error:
LINK : fatal error LNK1104: cannot open file 'libboost_program_options-vc90-mt-gd-1_42.lib'
The build log adds this (I've replaced project-specific paths with *'s):
Creating temporary file "******\Debug\RSP00001252363252.rsp" with contents
[
/OUT:"*********.exe" /INCREMENTAL /LIBPATH:"C:\Program Files\boost\boost_1_42_0\lib" /MANIFEST /MANIFESTFILE:"Debug\hw6.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"********\Debug\***.pdb" /SUBSYSTEM:CONSOLE /DYNAMICBASE /NXCOMPAT /MACHINE:X86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
".\Debug\****.obj"
".\Debug\****.exe.embed.manifest.res"
]
Creating command line "link.exe #********\Debug\RSP00001252363252.rsp /NOLOGO /ERRORREPORT:PROMPT"
I've also emailed info#boostpro.com (with a message very similar to this), but I thought maybe so would be faster.
EDIT: Yes, I checked if the file was there before asking this question, and yes, it's path is in the linker properties, under "Additional Library Directories" (I've tried with and without quotes).
EDIT 2: And it definitely sees the path because it appears in the 3rd line of the build log...
EDIT 4: Nevermind, it doesn't work in release mode or debug mode, but the file that doesn't work changes appropriately (same when I change the runtime library to a different type of multithreaded - I don't see single-threaded as an option, although it would work for me). Trying command line now.
There's a slight difference between the documentation and my actual installation. Where the documentation has "boost_1_42_0" in the path, the installer made my path "boost_1_42". With that fixed, it works.