How to compile QT5.9 Webenginewidgets for aarch64 architecture? - qt

I tried to follow the README file to compile all module, but after the compilation finished, I failed to find the WebEngineWidgets module, and when I add "QT += webenginewidgets" in .pro file, it showed a error: Unknown modules in QT:webenginewidgets

Related

Build Project with QtSerialPort

I want to build a project wich is using QtSerialPort. I'm using Qt 5.2.1 and Ubuntu 14.04.2 LTS. So, I have not to download QtSerialPort (?) See the news from 2013-07-03 here.
I'm creating a Makefile with cmake, which works. If I execute make, I got this error:
fatal error: private/qringbuffer_p.h: No such file or directory.
I have no idea what I have to do. Maybe it is a problem between Qt4 and Qt5?
If I clone the mirror as described here under Gettig the source code I can't execute the command
git checkout qt5.2.1

How to compile QT examples with QT creator and visual studio 2012 compiler?

I used the following configure options and commands to build qt5.5:
configure -developer-build -opensource -confirm-license -platform win32-msvc2013 -opengl desktop -nomake examples -nomake tests
nmake
QT is built successfully. After this, I installed QT creator 3.4.0 beta and configured qmake for qt5.5 and using Microsoft Visual studio C++ compiler 12.0 . Now when i try to build the qt3D examples using the QT creator, I am getting the following compile errors:
cpp.exe.2968.1625.jom
qtmain.lib(qtmain_win.obj) : error LNK2019: unresolved external symbol __imp__CommandLineToArgvW#8 referenced in function _WinMain#16
release\cylinder-cpp.exe : fatal error LNK1120: 1 unresolved externals
jom: C:\qt5.5\build-qt3d-Desktop-Release\examples\cylinder-cpp\Makefile.Release [release\cylinder-cpp.exe] Error 1120
jom: C:\qt5.5\build-qt3d-Desktop-Release\examples\cylinder-cpp\Makefile [release] Error 2
12:57:27: The process "C:\Qt\qtcreator-3.3.81\bin\jom.exe" exited with code 2.
Error while building/deploying project qt3d (kit: Desktop)
When executing step "Make"
12:57:27: Elapsed time: 00:03.
I understand that this error is because of winmain function missing which is required by visual studio compiler for any windows applications, However how does qt take care of it? What are the header files to be included to avoid this error for qt examples?
Please help me with your suggstions and let me know if I am missing any steps also.
I had a similar problem - I fixed it by linking Shell32.lib. See this discussion compilation of qt5.5 examples with qt creator with visual studio 2012 (msvc2012) fails for details.

Configure error with Qt, MinGW, CMake: Qt version not found

I have a problem building an application from Qt Creator; from the configure step, I get this error:
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindQt4.cmake:1382 (message):
Found unsuitable Qt version "" from NOTFOUND, this code requires Qt 4.x
Call Stack (most recent call first):
CMakeLists.txt:13 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
If I configure it from the command line, everything is file:
cmake -G "MinGW Makefiles" ..\ProjectDir
In the paths environment variable Qt is present (src, bin and lib paths).
Platform:
Windows 7
MinGW/GCC 4.4
CMake 2.8.11
Qt 4.8.5
Qt Creator 2.8.1
When you want to develop a CMake based project with Qt Creator, you should not execute CMake manually before. Qt Creator generates a Code::Blocks project from your source to work with CMake, so if you generate with -G "MinGW Makefiles" it will not work.
Instead, you could try the following steps:
In Qt Creator, Open Project > Select the top level CMakeLists.txt
Set a build directory somewhere close to the CMakeLists.txt or in its parent folder, then click on Next
Select your generator (Combination of a Qt version and a compiler)
[optional] set some CMake arguments
Click on Execute CMake, then Finish
Your project should now be opened in Qt Creator and ready for development

Problems with Qt 4.8.5 and MinGW/GCC 4.8.1

I just made a clean install of the following tools on Windows 7:
MinGW / GCC 4.8.1
Qt 4.8.5
Qt Creator 2.8.1
In the PATH there is: C:\Qt\4.8.5\bin;C:\Qt\4.8.5\include;C:\Qt\4.8.5\lib;C:\MinGW\bin;
1) I read the warning about the fact that Qt 4.8 needs GCC 4.6. I ignored it, using GCC 4.8.1. So this could be an issue.
2) I successfully installed Qt Creator. I successfully built the default Qt GUI application. When launched I get the error: "The program has unexpectedly finished." Debugging I get a segmentation fault before entering main(), in the qatomic_i386.h file, in the QBasicAtomicInt::deref() member function.
If I build a cmake based console application, everything is fine.
3) If I build a previous Qt cmake based project (either from the command line or from Qt Creator), this is what I get (out of tree build):
The first time I run cmake:
MyPrj-build>cmake -G "MinGW Makefiles" ..\MyPrj
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeMinGWFindMake.cmake:20 (message):
sh.exe was found in your PATH, here:
C:/Program Files (x86)/Git/bin/sh.exe
For MinGW make to work correctly sh.exe must NOT be in your path.
Run cmake from a shell that does not have sh.exe in your PATH.
If you want to use a UNIX shell, then use MSYS Makefiles.
Call Stack (most recent call first):
CMakeLists.txt:6 (PROJECT)
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file:S:/MyPrj/MyPrj-build/CMakeFiles/2.8.11.2/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file:S:/MyPrj/MyPrj-build/CMakeFiles/2.8.11.2/CMakeCXXCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
The second time:
S:\MyPrj\MyPrj-build>cmake -G "MinGW Makefiles" ..\MyPrj
-- The C compiler identification is GNU 4.8.1
-- The CXX compiler identification is GNU 4.8.1
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindQt4.cmake:1382 (message):
Found unsuitable Qt version "" from NOTFOUND, this code requires Qt 4.x
Call Stack (most recent call first):
CMakeLists.txt:12 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
Is it normal to have these different behaviours in the first and second cmake run?
Why cannot the system find Qt4?
Are these three issues dependent on each other?
How did you "install" your Qt? The only way of "installing" it in your case is to build it from the sources. Generally, you need to use the same compiler to compile Qt as you use to compile your Qt-using project. Some C++ compiler version mismatches might work, but you've just shown that your combination doesn't.

Qt error cannot find -lQtCored collect2: ld returned 1 exit status

I am getting the following error, when I run programs in debug mode.
cannot find -lQtCored
collect2: ld returned 1 exit status
I can run programs normally in release mode. Is it because I have done static linking (I can run my executable without Qt Creator)?
I am using Qt Creator with Qt 4.7.0 on Windows.
The following command would solve this issue:
sudo apt-get install libglu1-mesa-dev
Your linker can not see debug library of QtCore (as shown - -lQtCored, release lib - -lQtCore).
You need checked, really you build this debug library or not, then checked all pathes to this debug library.
PS. Yes, you can run executable without Qt-Creator. You should use qmake (into directory with your .pro) and make (when your qmake has generate Makefile).
PSS. If you want to run .exe then you should put some Qt libraries into directory with .exe.

Resources