I am trying to use an example application which uses OpenGL in QT, but when compiling I ger the following error:
:-1: error: error: /usr/lib/libQtOpenGL.so: No such file or directory
I do have the line QT += opengl in my pro file, so I was wondering what the problem might be - is this an option I should have set when I initially compiled QT?
(On Ubuntu 11.10)
It turns out I did have the file on my system, but it had been put in /usr/lib/x86_64-linux-gnu/ for some reason. So I ran:
sudo cp /usr/lib/x86_64-linux-gnu/libQtOpenGL.so /usr/lib
at the terminal, and all is well.
Related
I need to compile Qt 3.3.6 on my Win 7 PC to use it in combination with my MSVC2012 C++ compiler (MSVS 2012 Professional).
The simple reason is that I have a Qt 3.3.6 license and a lot of Qt 3.3.6 source code. So, a Qt upgrade is not an option. "Google" does not help...
Edited:16/11/10 1:40 pm
I already tried to compile it by starting a shell via VS2012 (Tools/VisualStudioCommandPrompt) and changing the cwd to the Qt directory containing the appropriate Makefile:
C:\Qt\3.3.6>bin\configure.exe -redo -spec win32-msvc2012
License file not found in C:/Users/mdew
Enterprise modules will not be available.
QMAKESPEC...................win32-msvc
Maketool....................nmake
[...list of all the installed programs...]
Configuration:
nocrosscompiler
dialogs
iconview
kernel
styles
tools
widgets
workspace
minimal-config
small-config
medium-config
large-config
full-config
release
thread
no-gif
zlib
jpeg
mng
png
bigcodecs
no-tablet
Debug symbols...............no
Thread support..............yes
Accessibility support.......no
Big Textcodecs..............yes
Tablet support..............no
STL support.................yes
Additional exports..........no
Exception support...........yes
RTTI support................yes
OpenGL support..............no
Image formats:
GIF support.............no
MNG support.............qt
JPEG support............qt
PNG support.............qt
Styles:
Windows.................yes
Windows XP..............no
Motif...................yes
Platinum................yes
MotifPlus...............yes
CDE.....................yes
SGI.....................yes
Sql Drivers:
ODBC....................no
MySQL...................no
OCI.....................no
PostgreSQL..............no
TDS.....................no
DB2.....................no
SQLite..................no
Interbase...............no
Sources are in..............C:\Qt\3.3.6
Install prefix..............C:\Qt\3.3.6
Headers installed to........C:\Qt\3.3.6\include
Libraries installed to......C:\Qt\3.3.6\lib
Plugins installed to........C:\Qt\3.3.6\plugins
Binaries installed to.......C:\Qt\3.3.6\bin
Docs installed to...........C:\Qt\3.3.6\doc
Data installed to...........C:\Qt\3.3.6
Translations installed to...C:\Qt\3.3.6\translations
Creating qmake...
Microsoft (R) Program Maintenance Utility Version 11.00.61030.0
Copyright (C) Microsoft Corporation. All rights reserved.
cd qmake
NMAKE : fatal error U1077: 'cd' : return code '0x1'
Stop.
Building qmake failed, return code 2
So, my attempt to compile it via MSVS2012 failed. NMAKE gets in trouble.
What am I doing wrong?
Thank you in advance for any hint!
BR mdew
have tried to compile Qt 3.3.6 from source with MSVC2015 and I've success.
Download Qt 3 source from https://sourceforge.net/projects/qtwin/files/Unofficial%20Qtwin/qt-win-3.3.6-6/
you must have QTDIR environment variable
set QTDIR=<your path to Qt 3 folder>
make sure bin folder is in your PATH
set PATH=%QTDIR%\bin;%PATH%
replace PATH_MAX with MAX_PATH in following files:
src\tools\qdir_win.cpp
src\tools\qdir.cpp
comment or remove
#include <winable.h>
from
src\kernel\qaccessible_win.cpp
run
configure.bat --help
configure.exe and link_includes.exe will be generated in bin folder.
cd bin
configure.exe -no-dsp -v
if you get errors saing error C3688: invalid literal suffix 'QTDLL_POSTFIX'
delete all QTDLL_POSTFIX in this files:
qmake\generators\win32\borland_bmake.cpp
qmake\generators\win32\mingw_make.cpp
qmake\generators\win32\msvc_dsp.cpp
qmake\generators\win32\msvc_nmake.cpp
qmake\generators\win32\msvc_vcproj.cpp
and change
QString dllStem = stem + QTDLL_POSTFIX;
to
QString dllStem = stem;
in
qmake\generators\win32\winmakefile.cpp
rerun
configure.exe -no-dsp -v
it should now compile successfully
I am new to Opencv and Qt and was following the following link:
http://www.laganiere.name/opencvCookbook/chap1s1_2.shtml to integrate them together.
I had setup the path to mingw32-make and even double checked to make sure the directory have the mingw32-make.exe but still, I continue to get the following error:
'mingw32-make' is not recognized as internal or external command, operable program or batch file.
when I tried to compile the OpenCV library in cmd.
Does anyone know the solution to this or could recommend other means to compile the OpenCV other than in the cmd? Thanks in advance :)
I just started to use Qt today and I don't know if I did something wrong when I installed it but I can't use QFormBuilder.
Linux Xubuntu 64b
what I did:
I clone this repo : git#gitorious.org:qt/qt5.git
init_repository >> ./configure >> make >> sudo make install
I downloaded qt-creator http://qt-project.org/downloads#qt-creator
I created a new project and when I try to include QFormBuilder he tell me that he doesn't know this file.
So, I saw somewhere someone who says that I need to add QT += uitools to the project file, but now when I try to use qmake, I am getting Unknown module(s) in QT: uitools.
Sorry for my english and thank you for your help.
If you get
Project ERROR: Unknown module(s) in QT: designer
you are missing qttools5-dev package.
To add to the answer by #svlasov, on RHEL or CentOS based systems (7.x or 8.x, etc.) you need to install:
yum install qt5-qttools-devel
Depending on the project you are building, you may also need to install qt5-qttools-static.
Have you actually read the documentation?
It writes this at the beginning:
The QFormBuilder class is used to dynamically construct user interfaces from UI files at run-time. More...
Header: #include
qmake: QT += designer
Inherits: QAbstractFormBuilder.
So, just follow that and put this into your qmake project file:
QT += designer
or you can invoke qmake like this:
qmake QT += designer
Of course, you need to make sure that you have the designer installed properly for this. You will need to install a package like libqt5designer5 on your Ubuntu, or if you had installed Qt manually, you will need to install the designer manually as well.
I am not that familiar with Ubuntu. You may need to install some corresponding development package as well. Either way, the point is that the library and headers need to be installed properly on your system which you seem to lack when getting Project ERROR: Unknown module(s) in QT: designer after either of the aforementioned solutions.
Read the documentation, it says to add the designer module to the .pro file:
QT += designer
I am trying to understand 'qmake' by following this tutorial . but when I come the the following command:
qmake -o Makefile hello.pro
my command line console shows me this message:
'qmake' is not recognized as an internal or external command, operable program or batch file
I understood that qmake is part of Qt creator and thus it should be executed whenever I run it within my project's folder. so, why it is not recognized ?
In the start menu entry that was created by the installer for Qt, you should find an item that opens a command prompt with all the needed environment variables (including the PATH) already set. For my Qt 5.0.2 install using MingW, it is called "Qt 5.0.2 for Desktop (MinGW 4.7)".
On Windows, you can add path to qmake to PATH or run qmake from directory where it placed, or use absolute path.
Sorry my friend, i donĀ“t speak English very well.
In Qt 5.10.1 I resolved this problem running the command prompt in the next path, C:\Qt\5.10.1\mingw53_32>, after you need change the directory where is the file hello.pro and run the commnand qmake -o Makefile hello.pro after you can see the makefile in the respective folder.
I have 2 versions of Qt for different arm devices and different toolchains: Qt 4.5.2 and Qt 4.7.3. Both versions are supposed to be placed in /opt/onyx/arm directory :(
The following error is occurred if I move the 1st Qt build in another directory (/usr/arm-marvell-linux-gnueabi) and run qmake:
#!/bin/sh
export QTDIR=/usr/arm-marvell-linux-gnueabi
/usr/arm-marvell-linux-gnueabi/bin/qmake -o Makefile.qt.onyx.a6x -spec qws/arm-marvell-linux-gnueabi-g++ project.pro
./run_qmake1.sh
Could not find mkspecs for your QMAKESPEC(qws/arm-marvell-linux-gnueabi-g++) after trying:
/opt/onyx/arm/mkspecs
Error processing project file: project.pro
What could be the issue and how can I resolve the /opt/onyx/arm conflict?
I would recommend grepping through /usr/arm-marvell-linux-gnueabi for any references to /opt/onyx. If you can't successfully change them (because they're in a binary), you could use symlinks to switch toolchains as needed.