I've been using static built Qt 5.0.2 built in this directory
D:\Soft\programming\qt-5.4.2.
Now I have installed the prebuilt qt-windows-opensource-5.0.2-mingw47_32-x86-offline to C:\Qt\Qt5.0.2
qmake location as shown in QtCreator configuration is C:\Qt\Qt5.0.2\5.0.2\mingw47_32\bin\qmake.exe
and compiler : C:\Qt\Qt5.0.2\Tools\MinGW\bin\gcc.exe
qmake location for the static version is
D:\Soft\programming\qt-5.4.2\qtbase\bin\qmake.exe and compiler
Microsoft Visual C++ Compiler 11.0 (x86)
Upon building a test program, I get several warnings of the form below.
C:\Users\Bill\Desktop\mkspecs\modules\qt_lib_sql.pri:8: error: WARNING: Include file D:/Soft/programming/qt-5.0.1/qtbase/mkspecs/modules-inst/qt_lib_sql.pri not found`
I used to ignore these errors in my static built qt. An example is
C:\Users\Bill\Documents\QtProjects\mkspecs\modules\qt_lib_sql.pri:8: error: WARNING: Include file D:/Soft/programming/qt-5.4.2/qtbase/mkspecs/modules-inst/qt_lib_sql.pri not found
Now, i get the warning and errors ;
:-1: error: error: unrecognized command line option '-wl,-enable-auto-import'
:-1: error: error: wl: No such file or directory
:-1: error: error: unrecognized command line option '-wl'
As a major concern, D:/Soft/programming/qt-5.0.1/ does not exists from the warnings of the prebuild in contrast to the existing D:/Soft/programming/qt-5.4.2 in the warning from the static build.
I'm guessing this new installation is reading configuration and qmake files from the static build directory.
If you are switching Qt versions you must do a 'nmake distclean' in your project folder (from a terminal or perhaps your IDE), then run qmake using from the version/path you want to build against. Otherwise old paths linger in your makefiles. A 'make clean' is not enough.
Related
I've been spending almost all day trying to get QT installed on my windows machine. I have installed QTCreator with QT 5.14.1 and QWT 6.1.3 (have also tried 6.2.0) and following these instructions with QWT: https://qwt.sourceforge.io/qwtinstall.html
Everything goes fine until I get to the same point where after running nmake it prints:
qwt.cpp
..\..\..\Qt\Qt5.14.2\5.14.2\msvc2017_64\include\QtCore\qglobal.h(45) : fatal error C1083: Cannot open include file: 'type_traits': No such file or directory
qwt_abstract_scale_draw.cpp
..\..\..\Qt\Qt5.14.2\5.14.2\msvc2017_64\include\QtCore\qglobal.h(45) : fatal error C1083: Cannot open include file: 'type_traits': No such file or directory
qwt_bezier.cpp
..\..\..\Qt\Qt5.14.2\5.14.2\msvc2017_64\include\QtCore\qglobal.h(45) : fatal error C1083: Cannot open include file: 'type_traits': No such file or directory
My path variables show that the include directory where type_traits exists is most definitely there.
Any pointers would be great. I'm not sure what else I can possibly do. I've uninstalled and reinstalled my entire .net framework, same with QT.
I ended up solving this, and it turned out to be an issue with the compilers I was selecting. I figure this could help people down the line so I will post what I documented on my company portal - the instructions I have written are as follows:
=====
Realistically, it doesn't matter which kit you select, as long as the compiler and QT version is set up correctly. What will indicate a correct kit setup is the display of a monitor logo at the label.
Configure a kit by first selecting it as default
C and C++ Compiler -> ''Microsoft Visual C++ Compiler 15.9.xxxx''
Compiler version 15.9.xxxx is a part of Microsoft Visual Studio 2017. If you cannot find this compiler in the drop down box, it is most likely because you are missing the 2017 install. Download the BUILD TOOLS and REDIST PACKAGE from here.
Debugger -> ''C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\cdb.exe''
If you can't find the debugger, it means you are missing the Windows 10 SDK. [[https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/|Download from here]].
QT Version -> ''Qt 5.14.1 MSVC 2017 32bit''
CMake generator (not sure how important this is, but it seems to make the compile run): Ninja
I'm getting the following error message when I run a program that uses Poco::NetSSL:
error while loading shared libraries: libPocoCryptod.so.81: cannot
open shared object file: No such file or directory
Here is my CMakeLists.txt:
cmake_minimum_required(VERSION 3.16)
set(PROJECT_NAME "pocotest")
project(${PROJECT_NAME})
find_package(Poco REQUIRED DataMySQL Net NetSSL)
add_executable(${PROJECT_NAME} src/PocoTest.cpp)
target_link_libraries(${PROJECT_NAME} PUBLIC Poco::Net Poco::NetSSL)
I installed Poco libraries from source, making sure to enable NetSSL. If I ls /usr/local/lib, the file libPocoCrypto.so.81 is there. I don't know what's missing here.
You appear to be linking with the debug version rather than the release version. Your error is for the "d" version of the file, "libPocoCryptod.so.81". But your file is the release version "libPocoCrypto.so.81"
I just needed to run sudo ldconfig on Ubuntu.
I've downloaded and installed the QT SDK and downloaded the QT Mobility source.
Following the provided instructions, I navigated to my QtMobility directory via the Visual Studio Command Prompt (2010)... note, this is the QtMobility dir with the bin, plugins, examples, etc. folders.
D:\
cd D:\Files\Downloads\QtMobility
configure
Regardless of whether I gave configure a -prefix parameter or not, the following output was displayed:
Checking available Qt
4.8.2
Checking make
... Unknown target environment .
Cannot find 'nmake', 'mingw32-make' or 'make' in your PATH
Aborting.
Of course, I then went to see if my computer had nmake in its PATH: the directory is added as follows:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin
I went to CMD and typed in "nmake /?" to receive proper output.
What am I doing wrong? When I try to simply run nmake in the QTMobility directory, it displays:
NMAKE : fatal error U1064: MAKEFILE not found and no target specified
Stop.
Help, please! Thank you. :) I will continue attempting debugs on my own...
I suppose this is late but you could simply run the visual studio command prompt, as it has specific env. variables preset to find nmake, etc.
I need to have a cmd build script to address x86 x64 compilation issue associated with the IDE (i mean switching qt versions & rebuilding). The problem is that, in my .pro file, I add dependency on external library in this way:
LIBS += ../Libs/SomeExternal.lib
Now when I build this project from QtCreator, everything compiles and builds fine, but when I try to build using command prompt + qmake I get the following linker error:
LINK : fatal error LNK1104: cannot open file '../Libs/SomeExternal.lib'
I understand that this issue is related to paths, but I don't know how to let LINKER.exe see the location where my project is located. Just like QtCreator does.
I try to build using the following way:
I run VS command prompt. I'm using MSVC compiler.
I type qmake.exe -project C:\ProjectPath\Project.pro
nmake
Thanks
Use:
LIBS += -L$${PWD}/../Libs -lSomeExternal
From the documentation:
The PWD variable specifies the full path leading to the directory
containing the current file being parsed.
I'm trying to compile Qt 4.5.1 on Windows XP targeting wince50.
I have the prerequisites installed (VS2008, WinCE50SDK, ActivePerl 5.10) and have downloaded the qt-embedded-wince-opensource-src-4.5.1.zip which has been installed in c:\Qt\4.5.1 and c:\Qt\4.5.1\bin has been added to the path.
From a VS command prompt, I navigate to c:\Qt\4.5.1 and execute the following:
configure -platform win32-msvc2008 -xplatform wince50standard-armv4i-msvc2008 -qt-gif -qt-libjpeg -qt-libpng -webkit -openssl -arch windowsce -opensource -iwmmxt
and I get the following error:
c:\qt\4.5.1\include\qtcore\../../src/corelib/tools/qvector.h(758) : fatal error C1083: Cannot open include file: 'QtCore/QPointF': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
I've tried this with previous versions of Qt, down to 4.4.3 and on two differnt XP machines (one with a clean build) and with various different configure options. Every time I get the same error.
What am I missing?
UPDATE:
OK, I've got a little further, though it's probably a dead end.
If I use qt-all-opensource-src-4.5.1 as a base then run configure it succeeds to build qmake, but then fails on missing wince files. So I then take the src and include folders from qt-embedded-wince-opensource-src-4.5.1 and copy them over the top of the qt-all folders then configure completes successfully.
But then nmake fails with the following error:
tmp\obj\debug_shared\qtmain_win.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'THUMB'
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\lib.EXE"' : return code '0x458'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
The fact that configure worked with this approach implies to me that the qt-embedded-wince-opensource-src-4.5.1 release has missing content.
Any suggestions as to what to try next to get this to compile would be very welcome.
Have you set up the environment variables correctly? I.e. it's often nice to have a .bat with the respective INCLUDE and LIB definitions. If you've installed Qt, there's a Qt command shell installed that can serve as a nice template, giving you command prompt that has the correct environment variables depending on which Qt version you want to use.
So did I - make sure you downloaded the WinCE package and NOT the Windows installer as this doesn't have support for WinCE.
qt-embedded-wince-opensource-src-4.5.1.zip doesn't seem to be missing files, it contains include\QtCore\QPointF as it should. I tested that source package and I can configure fine.
Does the file c:\Qt\4.5.1\include\QtCore\QPointF exist after you extract the source package?
I may be grasping at straws here, but: what program did you use to unzip the sources? The filename in your error message is displayed all in lower case, did your unzip program convert all files to lower case? Are you using a case-sensitive filesystem? (I don't know if that's even possible on Windows...) This may be a red herring, for all I know cl.exe arbitrarily lowercases filenames in error messages.
If this doesn't help, please post some more of the error, so we can tell what precisely is failing to compile and what arguments were passed to cl.exe.