I am trying to do a Qt cross-compilation from Linux(Ubuntu 16.04) to Windows by following these steps: Building Qt 5 on Linux, for Windows.
I successfully installed the full Qt5 using MXE and the above mentioned steps but, unhappily, I get an error regarding the NetworkAuth library, right after running
i686-w64-mingw32.static-qmake-qt5
in my project folder:
Project ERROR: Unknown module(s) in QT: networkauth
My .pro project file contains the networkauth inclusion as per Qt Documentation and is successfully compiled under Qt Creator:
QT = gui core multimedia network networkauth
I looked into < mxe root >/usr/i686-w64-mingw32.static/qt5/lib and could only find libQt5Network.a and libQt5Network.prl, but no networkAuth related files.
Does anyone have any suggestion on how to solve the problem?
The networkauth package was missing from MXE. I've created one and there's a pull request for it now: https://github.com/mxe/mxe/pull/2112
You can either wait until it's been accepted into the main project or build the patch or our fork manually.
Related
I installed qt creator and qt 3dstudio with the qtOnline installer for linux. I want to build a project using these two packages. I design my project in qt3dstudio and then I use qtcreator to code the logic of the program. But I cannot import qt3dstudio module into the code.any suggestions??
I need to get this going on ubuntu 16.04LTS. I couldn't find anything useful on the web about the problem. I did try to build qt3dstudio but some of the dependencies caused my ubuntu desktop to stop working and I had to reinstall ubuntu.
QT modules in my .pro file:
QT += widgets qml quick gui 3dstudioruntime2
and when I hit build I get the following error:
Unknown module(s) in QT: 3dstudioruntime2
I'm trying to replicate an application that we currently have running on a physical Ubuntu server using an Ubuntu machine in Virtual Box. It is a QT application but on the server we are running it using pm2 from NPM. After installing QT, and installing drivers needed for the application i've tried to run it but keep coming across this error:
Cannot mix incompatible Qt library (version 0x50701) with this library (version 0x50905)
I've inherited the code from someone else and don't want to change the project to QT5.9.5, so i'm trying to run with 5.7.1, I've followed instructions on other questions in order to change the QT version to 5.7.1 but still get the same error when running it.
I followed the instructions here:
https://unix.stackexchange.com/questions/116254/how-do-i-change-which-version-of-qt-is-used-for-qmake
When checking the QT version using "qmake -v" in the console I get the following output:
QMake version 3.0 Using Qt version 5.7.1 in /home/sam/Qt5.7.1/5.7/gcc_64/lib
So although it looks to me like i'm using the desired version of Qt (5.7.1), i'm still getting the incompatible library issue, i'm very new to all of this so apologies if this is a stupid question. If anyone could tell me what to do in order to use the compatible library that'd be great, thanks.
I will try to explain this in steps!
Each complete set of Qt libraries is called a Qt "distribution". You can get Qt distributions from a variety of sources:
Installed from the package manager of your OS (.deb/.rpm).
From a downloaded zip file on http://qt.io
As a cloned repo from git
etc..
Some of the available Qt distributions will come pre-built, and some will need to be built from sources. In either case they will all have a qmake program that is specific to that particular Qt distribution. This program is responsible for building programs so that they link to the particular Qt distribution that the qmake is part of. qmake is also used when building with QtCreator.
If you have a binary built with one qmake and you try to run it on another computer, it might find the wrong Qt libraries during dynamic linking and spit out errors of "incompatible version of Qt".
There are many solutions to this problem;
Collect all the Qt libraries (Mine are in /home/myusername/Qt/5.version/gcc_64/lib/*.so) in the same folder as your program executable. This will make sure they are prefered to any other version of Qt that may be in your dynamic linker's path.
Uninstall the OS supplied Qt version(s). This may not be advisable especially if other programs use them.
Rebuilt your program from source using the correct qmake.
Yesterday I installed Qt 5.4 on my windows 7 PC. But I can not build and run any Qt project including those given in Examples section on the Welcome page of Qt Creator 3.3 except for a few. Also, I can’t run any qml file either using this command from cmd: “qmlscene myqmlfile.qml”
Please note that I have added this path to my environment variables:
C:\Qt\Qt5.4.0\5.4\mingw491_32\bin
and Qt installation directory is
C:\Qt
The error message I get in the output window in Qt creator, and in console when running a qml file from cmd, is as follows:
QOpenGLShaderProgram::uniformLocation( qt_Matrix ): shader program is not linked
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed:
""
Previously, I used PyQt5, and ran qml files using the command
qmlscene myqmlfile.qml
without any problem. Then installed Qt Creator 3.3 to run Qt projects, but failed (got some error saying problem in qmake). Finally I uninstalled PyQt5 and Qt Creator 3.3, downloaded Qt 5.4 and installed it, but still could not run Qt projects.
I found in some website, that I need open GL 2.0 to run Qt projects in Qt 5.4. How do I make sure that I have openGL 2.0? (I checked with GPU-Z and it shows my shader model 2.0 and I don’t know if it has anything to do with OpenGL :( )
Please help me correct whatever is wrong with my Qt installation. This is freaking annoying.
Make sure you have Intel Graphics Driver installed from Intel. Microsoft's default drivers do not include OpenGL support.
I have a prebuilt version of netcdf Library which I've downloaded from the Unidata website,
Now I am trying to link this Library to Qt 5, to use it in my Qt project. So I looked for some solutions in the internet and I found that I should add these lines to my Project.pro :
LIBS += -LC:/netcdf/lib -lnetcdf
INCLUDEPATH += C:/netcdf/include
But after runing the project, it doesn't work, so I rerun it with the debuger and it shows me this Message Box (titled "executable Failed") : During startup program exited with code 0xc0000135
Please help !
The pre-built libraries are built using Microsoft Visual Studio. As I recall, the C/C++ compiler the Qt SDK uses on Windows is a mingw-variant of gcc. I am not certain if the pre-built netcdf libraries are compatible with the mingw runtime, but it is usually not a good idea to mix C runtimes anyways.
I'm assuming you are using Qt Creator; if so, then it may be easier than you think to compile the netcdf-c libraries yourself. Because the netcdf-c project uses CMake, you will be able to open it as a project in Qt Creator.
Prerequisites
You will need the following:
cmake: http://cmake.org
netcdf-c source code: http://github.com/Unidata/netcdf-c/releases
NetCDF Dependencies
Note that you will need to install the following dependencies first, depending on the functionality you want from the netcdf library.
NetCDF4 support requires libhdf5 and libhdf5_hl, both provided by the hdf5 package available from http://www.hdfgroup.org.
DAP support requires libcurl. Google should be able to help you find this.
If you do not need these capabilities, you'll be fine with a straight netcdf-classic install.
Opening netcdf-c as a project in Qt Creator
Launch Qt Creator
Go to file->open project
Navigate to the netcdf-c source directory and open the CMakeLists.txt file.
This will load the netcdf source as a new project in Qt Creator. At this point it should be pretty straight forward to compile netcdf and install it somewhere on your system to use with your project.
Incorrect Assumption
If my assumption that you are using Qt Creator is wrong, this is all still possible from the command line; it will be, however, a little more involved.
I created an application using Imagemagick library with Qt on Mac.
Now that I want to deploy the application for windows:
I installed the imagemagick library
on my pc,
I installed the SDK version of QT 4.7
I added my include and lib paths
And when I go run the application I'm getting errors that I think they are related to mingw32.
here are the build issues:
and here is the compile output:
Can someone Identify the error ?
What do I have to do to deploy the application for windows?
I also tried to use a Mingw32 version of my library but again, It didnt work:
When I put -lmagick after the lib it says file lmagick cannot ne found
and when I try to build unticking the shadow build checkbox in the build settings, it give me the errors in the first screenshoot. Thank you
See the answer to this question.