I just installed Qt creator to develop c++ on linux,
I try to start to build the smallest example, however I get this message:
:: error: The Qt version is invalid: Could not determine the path to the binaries of the Qt installation, maybe the qmake path is wrong?
:: error: The qmake command "" was not found or is not executable.
in the build issues window
What should I do
Thank you
In the settings window on Qt4 tab there should be automaticaly-detected path to qmake. If there isn't one (or it is invalid) you should simply give the correct path. For this you have to locate qmake using the command window in linux: whereis qmake. Then on qt4 tab you should add manually the location (I particularly added: /usr/lib/qt4/bin/qmake).
In the settings window on Qt4 tab there should be automaticaly-detected path to qmake. If there isn't one (or it is invalid) you should simply give the correct path.
Related
hey guys I just updated my mac to monterey 12.1 and then my qt creator doesn't compile anything any part of code no deference non console app or non widget app or any other types and just telling me the same error:
:-1: error: No rule to make target `untitled6'. Stop.
:-1: warning: "/.../.../CommandLineTools/usr/bin/clang" is used by qmake, but
"/usr/bin/clang" is configured in the kit.
Please update your kit (Replacement for "Qt 6.2.0 for macOS") or choose a mkspec
for qmake that matches your target environment better.
:-1: warning: "/.../.../CommandLineTools/usr/bin/clang++" is used by qmake,
but "/usr/bin/clang++" is configured in the kit.
Please update your kit (Replacement for "Qt 6.2.0 for macOS") or choose a mkspec
for qmake that matches your target environment better.
I try to build new projects and new codes and check my paths and also uninstall and install again the qt but non of them worked and it gave me the same error. I had read the errors but I can't figure out what should I do with my kits!
this is my confige page:
What should I do?
Manually delete the hidden folder .qmake.stash in your build folder from the terminal
Run qmake from Qt Creator
Build as normal
(A manual make distcleanin the build directory should also fix it, but I never tried that)
I have QtRPTProject to run in the QtCreator but It is showing errors like " Cannot run compiler 'g++'. Maybe you forgot to setup the environment?" and "Project ERROR: Unknown module(s) in QT: script" while building.Any help ??
Project ERROR: Unknown module(s) in QT: script
This means that the module Qt Script is not installed.
This module has been deprecated and is not installed by default, you have to opt-in.
The exact procedure on how to install it depends on how you installed Qt in the first place. If you used the online installer, it is just a matter of running the "Maintenance Tool" and checking the Qt Script checkbox.
Cannot run compiler 'g++'. Maybe you forgot to setup the environment?
This means that Qt Creator cannot find the c++ compiler.
That means that you have not installed a compiler, or not configured Qt Creator correctly.
Again the exact procedure depends on your system and which compiler you want to use. If you are on Windows, the Qt Maintenance Tool offers to install MinGW for your. Like for Qt Script it is just a matter of checking the right checkbox. Be sure to select the MinGW version that matches the version of Qt you selected.
If you need more help, please edit your question and add details about your system and your current installation.
I have a project I made with Qt 5.7 in QtCreator, but now I would like to be able to build the project with qmake in the terminal rather than through QtCreator. However, I can't get qmake to run with Qt 5.7.
Following the instructions in this webpage, I can switch qmake to qt5 but qmake -v still says I'm running QT 5.2.1. How can I switch this to Qt 5.7?
Edit: Adrien's second comment worked. I was unable to get qmake to switch to Qt 5.7, but I can simply directly call the qmake that came installed with Qt 5.7 like this:
/home/<user>/Qt5.7/Qt5.7.0/gcc<something>/bin/qmake
Short answer: yes of course :)
Each Qt build builds its own qmake binary. So if you already built/installed Qt 5.7, it means you are simply pointing to your previous Qt version's qmake. You can access any Qt version qmake executable from your Qt install folder, i.e. for Linux:
/home/<user_name>/Qt/Qt<version>/<compiler>/bin/qmake
Note that the path to Qtfolder, and its name may vary depending on the settings you used for the first installation.
If you want to use a global setting instead, and if qtchooser -list-versions lists the Qt version you want to use, then make sure to set export QT_SELECT=<Qt version> (without spaces) in the same terminal as the one you use qmake from afterward. Environment variables are not kept when you close your terminal, or shared between different terminals.
export QT_SELECT=qt5
qmake
I want to compile the qwt library using qt 5.3. Previously I had older versions of Qt. So, when I call the Qt 5.3.0 32-bit for Desktop (MSVC 2012 OpenGL) shell and move to the directory, which contains qwt (C:\qwt-6.1.0), then perform qmake qwt.pro I get this error:
Cannot read c:/Qt/Qt5.0.2/mkspecs/win32-msvc2010/qmake.conf: The system cannot find
the path specified. Could not read qmake configuration
file c:/Qt/Qt5.0.2/mkspecs/win32-msvc2010/qmake.conf.
Error processing project file: C:\qwt-6.1.0\qwt.pro
Calling:
qmake -set QMAKESPEC "C:\Qt_5.3\5.3\msvc2012_opengl\mkspecs\win32-msvc2012\"
Does not help.
PS. Solution is found! I've tried not to do like is in qwt tutorial, simple open *.pro file by Qt Creator. After this just "build" and everything was done. Without console
So I have made a new qt gui project, gave it a name and right after it was created i received this error:
"No default QT version is set.Open the QT page in the preferences dialogue and add a QT version."
I open the preferences dialog,click add ,but when i have to give the path for the bin and the include files,i can't find any where my QT SDK is installed.
I installed qt sdk 1.2.1,and qt eclipse integration 1.6.1.
Where are those paths installed in qt sdk?
You are asked to add a Qt version. To do so, go to the eclipse preferences, switch to the Qt page and click on "Add...".
You will then be asked the binary path (of the Qt binary files for the build process, these are for example qmake, moc, ...) and include path (where the Qt header files are stored).
Browse for your Qt installation path and select the subdirectories bin and include respectively.
If you don't know where Qt has been installed to, try to launch the Qt command line (not the Windows default command line) from your Windows start menu and type:
qmake -v
The output should then look similar to this:
QMake version ...
Using Qt version ... in C:\Qt\...\lib
Your bin path sould then be at C:\Qt\...\bin; the include path at C:\Qt\...\include.
Then accept the assistant dialog and select this version as the default version by clicking on the "Default" button. Then retry to build your project.