ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
General messages in qt-creator after setting up first project.
Quote:
/usr/lib64/qt5/mkspecs/features/toolchain.prf(70): system(execute) requires one or two arguments.
Project ERROR: Cannot run compiler 'g++'. Maybe you forgot to setup the environment?
Error while parsing file /home/$USER/scripts/$PROJ/$PROJ/$PROJ.pro. Giving up.
Verified g++ from a terminal by compiling a simple hello world. If there is a place in qt-creator to point to the compiler I can't find it.
centos 7.6
qt-creator 4.1.0
This worked out of the box in a mint linux install but I need to run this in centos for work.
Any idea what might be wrong? I've done pyqt stuff before but I'm a total newbie to c++/qt. Assume I know nothing.
In the qt-creator sidebar, click on Projects. On the left of the new window, you click on the button “Manage Kits”. Select the Kit/Qt-version of your choice and verify the settings.
Normally all this is configured automatically and I cannot know why it did not for your project.
I have never used QT_Creator, but a quick search tunred up this page in the docs, Adding Compilers as the first hit. It indicates that most times this is configured automatically, but you can set multiple compilers manually.
In the qt-creator sidebar, click on Projects. On the left of the new window, you click on the button “Manage Kits”. Select the Kit/Qt-version of your choice and verify the settings.
Normally all this is configured automatically and I cannot know why it did not for your project.
There is no 'Auto-detected' kit. There is a 'Manual' kit listed but I do not recall setting it up.
These are the properties of the 'Manual' kit.
Quote:
Name: Desktop
File system name: <blank>
Device type: Desktop
Device: Local PC (default for Desktop)
Sysroot: <blank>
Compiler: GCC (x86 64bit in /usr/bin)
Environment: No changes to apply.
Debugger: System GDB at /usr/bin/gdb
Qt version: Qt 5.9.2 in PATH (System)
Qt mkspec: <blank>
CMake Tool: System CMake at /usr/bin/cmake
CMake Generator: CodeBlocks - Unix Makefiles
CMake Configuration CMAKE_CXX_COMPILER:STRING=%{Compiler:Executable}; QT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable}
There is a 'Manual' kit listed but I do not recall setting it up.
In your configuration the C++ compiler is missing. The executable in this case is not called gcc, but g++. Usually a second line is at display for “Compiler”. If you know that g++ is available, try the button “Manage”, then “Add”.
Okay. As the situation is unknown to me, I can only suggest a Trial&Error approach. Once the compiler is definitely installed and added to the kit, or a different one, open your project in Qt-Creator. There should be an icon on the outer left edge of the window, the fourth from the bottom, naming your currently opened project. Clicking that, the available kits are listed, in your case at least one should appear. Try to select it, even if there is only one kit available; release or debug should not make much difference.
There are no hard and fast rules for that, but whenever your own interest in it has been satisfied it would be appreciated and would signal others that you are at an end point with it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.