I am trying to build a program using the command scons compiler = msvc. During this action a link error appears: LNK1181: cannot open input file 'QtCore4.lib'. I have installed Qt for Windows from http://qt.nokia.com/downloads (the free version) and tried to find the requested lib file, but only found the same dll file.
Any advice on how to proceed would be most appreciated.
It seems I have built Ot using debug option. Without it creates all the necessary libraries.
Related
I downloaded Qt5.6 VS2013 32bit and try to run the official example of QtWebEngine.
I just followed the instruction but
When linking it gives out an error of
LNK1104 file not found c:\Users\qt\work\install\lib\Qt5Widgetsd.lib.
However, I have no idea of where this path c:\Users\qt\work\install\lib\ comes from.
I did text search in all directories of example folder and no hits other than generated files(makefiles and pdbs).
I also checked system environment variables but no hits.
Furthermore, I checked Qt Creator'r Projects panel and its Build Environment and still no hits.
Did I miss something?
P.S. this error was given out by linking DemoBrowser example of QtWebEngineWidgets pro
The link is generated by qmake when it generates the build scrip from the qt project file (*.pro). It is based from the qmake application path that is generaly installed together with the libraries (check you qt kit setup to change it if needed: Jst browse to qmake.exe application).
Then try regenerate the build script. It should fix the issue.
You may also have issue with installation not being in debug mode; you are trying to use Qt5Widgetsd.lib library instead of the non-debug one Qt5Widgets.lib
I am currently trying to compile a Qt application that I downloaded from github on my windows machine. I did not have any trouble compiling this on Ubuntu so I was hoping someone could help shed some light on my problem.
I am using Qt-Creator to compile the program.
The exact error messages are:
:-1: error: cannot find -lQt5Guid
:-1: error: cannot find -lQt5Cored
collect2.exe:-1: error: error: ld returned 1 exit status
My first idea when reading those messages was that the windows PATH variable does not include the locations of the libraries. But when I checked, my PATH contained the following:
C:\Qt\Qt5.1.0\5.1.0\mingw48_32\bin;C:\Qt\Qt5.1.0\Tools\mingw48_32\bin;...
Which exists and contains what looks like the correct Dlls.
I am using MingGW rather than the visual studio compiler (although i have it available if needs be).
How can I fix this error and what could be causing it?
EDIT: When I run qmake there does not seem to be any problem. The errors come up when I try to build the project.
Cored is a fundimental part of Qt so it looks like the linker can't see any of the Qt libraries.
Did you install Qt 5.1.0 SDK?
A few things to check:
Do you have a line like this in your .pro file?:
QT += core
You mentioned "Projects section my path" are you talking about the windows PATH variable? these paths should also be in that. You can check with dos command:
echo %PATH%
If these paths are not there, for a test, add them in if this works then something has gone wrong with the local PATH setup (i.e. when running qt creator - if you are using qt creator?)
Finally just check that the debug version of the Qt5Cored.dll exists in that folder (C:\Qt\Qt5.1.0\5.1.0\mingw48_32\bin) because it looks like you are building a debug build (which is why your program is looking for 'd' post-fixed name Qt5Cored and not Qt5Core).
I just installed Qt, Qt creator and g++ on the latest version of Mint, and attempted to compile the default hello world project. After configuring a compiler kit I get the following error:
bits/c++config.h: No such file or directiry
/usr/include/c++/4.7/utility
No surprise there is no such file at that location. It appears this is some sort of config file where you specify what architecture you're compiling for.
What package do I install, or how do I write or generate this config file?
c++config.h is not in /usr/include, but rather in an architechture-dependent path. What you need is one of the libstdc++ development packages. You have not specified your platform details but my guess is that what you need is libstdc++6-4.7-dev as the error message refers to 4.7. See full list of packages containing c++config.h under Ubuntu and Ubuntu-likes here.
I don't know of a specific package search for Mint but the Ubuntu one has hit the nail on the head for me.
edit: ah drat, I only noticed this was 8 months old immediately after I posted the answer. Is this bad?
I'm trying to write Qt3D application in windows. I'm getting an error when i trying to compile the program and run it. the error's message is : 'The procedure entry point ??4QImage##AEAAV0#$$QAV0##Z could not be found in the dynamic link library QtGui4.dll'.
my compiler is Microsoft Visual C++ 9.0 and Qt version is 4.8.1.
is there any solution for this?
Do you face the problem in both running from the IDE and standalone exe, and both in debug and release mode. IF some of these work, make sure proper QtGui4.dll is copied to the same path where your executable is getting generated.
I am using qt 4.5
I have created a project and I want to compile on visual studio 2008 for windows mobile 6.0
So I have created the project files doing this:
D:\Projects\Phone_PDA\Phone_PDA>set QMAKESPEC=win32-msvc2008
D:\Projects\Phone_PDA\Phone_PDA>qmake -tp vc
The VS project was created. However, when I try and compile I get this error:
LINK : fatal error LNK1181: cannot open input file 'c:\Qt\qt\lib\qtmaind.lib'
However, when I check my librarys and includes under project properties in visual studio. I have this:
Additional Include Directories
c:\Qt\qt\include\QtCore
c:\Qt\qt\include\QtGui
c:\Qt\qt\include
c:\Qt\qt\include\ActiveQt
debug
c:\Qt\qt\mkspecs\win32-msvc2008
Additional Library Directories
c:\Qt\qt\lib
Additional Dependencies
c:\Qt\qt\lib\qtmaind.lib
c:\Qt\qt\lib\QtGuid4.lib
c:\Qt\qt\lib\QtCored4.lib
However, when I browse to the directory c:\Qt\qt\lib all I have is:
qtmain.prl and qtmaind.prl
However, I don't have qtmaind.lib or qtmain.lib
Many thanks for any suggestions,
Are you sure you are using the correct QMAKESPEC?
I would think you would need to use wince*-msvc2008
See Qt: Supported Platforms
Open the Visual Studio command prompt (you can find a shortcut in the start menu). It has all the appropriate environment variables set. Go to C:\Qt\20****\qt. Type configure and then nmake.
Did you download the source distribution? If so you would need to compile Qt before you get the libs.
See:
http://doc.qtsoftware.com/4.5/install-win.html
http://doc.qtsoftware.com/4.5/install-wince.html
My commercial version comes precompiled. If I remember correctly, when I used the open source version I needed to compile everything myself.
First you have to configure the Qt to your machine to get the libs! It will takes several minutes. Follow the steps in: http://portfolio.delinkx.com/files/Qt.pdf
in properties -> linker -> input
remove ANY path for qt libraries such qtmaind.lib
sometime you need remove :
/SUBSYSTEM:WINDOWS%40QMAKE_SUBSYSTEM_SUFFIX%40) from the VS project (under Properties --> Linker --> Command Line).
this is known BUG in VS addin