Adding appropriate debugger to BeagleBone Qt Kit - c++

I downloaded gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux.tar.xz, extracted it and in Qt Kit selected debugger as arm-linux-gnueabihf-gdb, and I get following error:
I am not sure why debugger is not appropriate for this situation?

I solved a problem after several hours of searching for solution.
Follow these steps:
sudo apt-get install gdb-multiarch
In your BBB kit for debugger select gdb-multiarch from /usr/bin/, it should work now!

Related

How to add new kits to Qt Creator

How do I add more kits like MinGW to a Qt installation?
Just to help people, I'm gonna answer this here for Windows, but I'd like to know for Linux too.
Search for the Qt uninstaller in Windows, launch it, but instead of uninstalling it, select new kits to install.
For Linux, the repos method of sudo apt install... never seems to work, they don't install kits, which is a bit useless, so download and install the online installer for Linux/Mac/Windows here

C++ set-up for Visual Studio Code not working

So I am trying to code C++ on Visual Studio Code. I am following a tutorial from youtube. https://www.youtube.com/watch?v=DIw02CaEusY&t=597s
When I get to 9:58 is where I loose track. He gets a message on his #include that says edit "InlcudePath" settings
I am doing the exact same thing as him and mine doesn't work. I am not sure why. I will show screenshots of his video and my code. I would greatly appreciate if someone could help me. Thanks!
This is the youtube video's image
This is my image
You can follow this official tutorial to setup your VSCode environment, which is always up-to-date:
https://code.visualstudio.com/docs/languages/cpp
In short:
Open extension tab
Install "C/C++" extension.
Install compiler, depending on your OS:
Debian/Ubuntu: Install GCC using sudo apt install build-essential
Windows with BuildTools from Microsoft: Install Build Tools for Visual Studio 2019 from here: https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16
Windows with MinGW: Install MinGW like in the video you provided.
macOS: Install XCode
Follow one of the tutorial to setup VSCode:
Windows with BuildTools from Microsoft: https://code.visualstudio.com/docs/cpp/config-msvc
Windows with MinGW: https://code.visualstudio.com/docs/cpp/config-mingw
macOS: https://code.visualstudio.com/docs/cpp/config-clang-mac
VSCode, depending on your platform should automatically find the compiler you have installed. You can try also to restart VSCode if can't find any.
You should see .vscode directory in your project,
VSCode will ask you if you want to create those files.
error related to path , i guess you have to set the path of mingw bin folder in path of enter image description hereenvironmental variables in system variable

QtCreator: No valid kits found

Installed just the IDE on Windows 7. I want to create a Plain C++ Project (Non-QT Project); however I get an error: No valid kits found. When I click on Options->Kits, I see the Desktop (default) kit, and it shows no errors.
Am I getting the error because I didn't install a Qt library? If so, is there any way I can bypass downloading/installing that and just use the IDE?
Found the issue. Qt Creator wants you to use a compiler listed under one of their Qt libraries. Use the Maintenance Tool to install this.
To do so:
Go to Tools -> Options.... Select Build & Run on left. Open Kits tab.
You should have Manual -> Desktop (default) line in list. Choose it.
Now select something like Qt 5.5.1 in PATH (qt5) in Qt version
combobox and click Apply button. From now you should be able to
create, build and run empty Qt project.
Though OP is asking about Windows, this error also occurs on Ubuntu Linux and Google lists this result first when you search for the error"QtCreator: No valid kits found".
On Ubuntu this is solved by running:
For Qt5:
sudo apt-get install qt5-default
For Qt4:
sudo apt-get install qt4-dev-tools libqt4-dev libqt4-core libqt4-gui
This question is answered here and here, though those entries are less SEO-friendly...
No valid Kits found
The problem occurs because qt-creator don't know the versions of your qt,
your compiler or your debugger.
First off, let's solve the Qt versions. It may normally solve the others too ;).
You try to create a new project, run select a kit and then there is no kit available in the list.
Follow the steps:
Execute in your terminal the command: sudo apt-get install qt5-default
to install qt version 5.
Verify the version of your Qt and the location of your qmake file. Do this by executing in your terminal the command qmake --version.
You may have a result similar to this line.
QMake version 3.1
Using Qt version 5.9.5 in /usr/lib/x86_64-linux-gnu. What's important here is the location /usr/lib/x86_64-linux-gnu.
Open your Qt-creator.
Go to "Tools>Options" or "Outils>Options"
Select the Qt Versions combobox and select and click "Add" or "Ajouter"
Then find the qmake file in the location of step 2. Here /usr/lib/x86_64-linux-gnu/qt5/bin/ here you have the qmake file for qt5. Open it, click Apply.
Go to "Kits" combobox. Select Desktop(by default) or Desktop(par défaut). Then scroll down to the button to select Qt version: and list down to select the version you just add.
8.Then apply all. Check your compiler and debugger and it's ok. You're done.
Yes I ...
Hope it's help ;)
In my case the issue was that my default kit's Qt version was None.
Go to Tools -> Options... -> Build & Run -> Kits tab, click on the kit you want to make as default and you'll see a list of fields beneath, one of which is Qt version. If it's None, change it to one of the versions available to you in the Qt versions tab which is just next to the Kits tab.
For QT 5.* if you face error at Kits, like No Valid Kits Found, go to Options->Build&Run-> (Kits tab) then you see a Manual category which should list Desktop as the default.
Just go to your OS Terminal and write sudo apt-get install qt5-default, go back to QT Creator and Start your New Project, and there you see the kit option Desktop included in the list.
I had a similar problems after installing Qt in Windows.
This could be because only the Qt creator was installed and not any of the Qt libraries during initial installation. When installing from scratch use the online installer and select the following to install:
For starting, select at least one version of Qt libs (ex Qt 5.15.1) and the c++ compiler of choice (ex MinGW 8.1.0 64-bit).
Select Developer and Designer Tools. I kept the selected defaults.
Note: The choice of the Qt libs and Tools can also be changed post initial installation using MaintenanceTool.exe under Qt installation dir C:\Qt. See here.
In my case, it goes well after I installed CMake in my system:)
sudo pacman -S cmake
for manjaro operating system.
Another way to solve this issue (I did it on Ubuntu 16.04 but it might also work for windows and other Ubuntu versions):
While going through the installation steps, when you reach the step where you choose which packages to install via check boxes, instead of just pressing next with the default "Tools" checkbox selected also check the box for the version of QT you would like in addition to the "Tools" box. I usually check the first box which is the latest version of QT.
After doing this you should not see the "no valid kits found" issue described in this thread.
Happy Coding.
on macOS: (as of 2021)
brew install qt<latest_version> e.g. qt6
qmake --version will output:
QMake version 3.1
Using Qt version 6.0.3 in /usr/local/Cellar/qt/6.0.3_2/lib
(This is the path to the QT installation --> `/usr/local/Cellar/qt/6.0.3_2/lib`)
Go to `Preferences -> Kits -> Qt Versions
Click Add then navigate to /usr/local/Cellar/qt/6.0.3_2/bin
Select qmake executable
Go to Kits tab
Select Desktop (x86-darwin.....) in the list
Scroll down to Qt version dropdown box and select your newly installed Qt version.
Click Ok.
I had solved this issue on my Linux mint , first :
install qmake : sudo apt-get install qt5-default
go to terminal and type qmake, you should get the path of qmake
create a new project (application widget type ), when you reach
the kits part you should find desktop list item, click manage then
go to the kits tab bar and scroll down until you find a drop-down called
Qt version, click manage and paste the path there then submit.
Now the settings are done !!

Qt on beagle bone black (full install not cross-compile)

I want to use qt on beagle bone black same as we use on desktop without "cross compiling" and "tool chain" stuff. I already done this for raspberry pi running raspbian wheezy using
apt-get install qtcreator
command. I searched on google and found something called qt embedded for BBB. I followed
opkg update
opkg install qt4-embedded --force-depends
opkg install libqtcoree-dev libqtguie-dev
instructions and installed qt embedded on BBB running Armstrong on it.
Now i have a project developed on my desktop in qt creator and i want to build it on BBB. I am searching for this from last two days with no success, all i found eveywhere is "cross compile" and "tool chain". Does anyone knows how to build qt project on BBB natively (whether it is possible or not?)?
I copied my folder containing qt project on Armstrong desktop.
Then i go in directory
cd Desktop/DisplayPara
and tried
qmake DisplayPara.pro
it only shows somthing like this
sh: -d:command not found
sh: -d:command not found
I tried
qmake -project DisplayPara.pro
which also end up with same error. I don't know what's going wrong ? any help, suggestions will appreciated. Thanx...
I didn't have any luck with those instructions either.
I removed all Qt packages and did:
opkg install qt4-embedded
opkg install qt4-embedded-dev
Then in the directory with my application I did:
source /usr/share/qtopia/environment-setup
qmake -project
qmake
make
Exit gnome (or other desktop). I just use Ctrl-Alt-F1 to get to a console window.
Then run:
./myapp -qws
The -qws flag makes the application run under its own Qtopia server.
I would like to be able to run under the Gnome desktop environment, but this is the only way I could get something that works.
Hints welcome.

How do I install Eclipse with C++ in Ubuntu 12.10 (Quantal Quetzal)?

I just installed Ubuntu 12.10, and I tried to install Eclipse and C++, but I failed miserably.
I started with an installation from the Software Center, Eclipse worked, but only in Java. Then I started googling for installation guides and tutorials, but after hours of downloads and installations, the C++ in Eclipse still doesn't work.
So now I have two questions:
How do I clean up this mess?
Actually, how do I know if there is a mess?
According to the Ubuntu Software Center, Eclipse is installed and has three add-ons.
How do I know if the other installations of other Eclipse versions/packagings overwrote each other or if I have multiple installations?
How do I install the latest version of Eclipse and C++ in Ubuntu 12.10?
There is a package called eclipse-cdt in the Ubuntu 12.10 repositories, this is what you want. If you haven't got g++ already, you need to install that as well, so all you need is:
sudo apt-get install eclipse eclipse-cdt g++
Whether you messed up your system with your previous installation attempts depends heavily on how you did it. If you did it the safe way for trying out new packages not from repositories (i.e., only installed in your home folder, no sudos blindly copied from installation manuals...) you're definitely fine. Otherwise, you may well have thousands of stray files all over your file system now. In that case, run all uninstall scripts you can find for the things you installed, then install using apt-get and hope for the best.
I used (the suggested answer from above)
sudo apt-get install eclipse eclipse-cdt g++
but ONLY after then also doing
sudo eclipse -clean
Hope that also helps.
I also tried http://www.eclipse.org/cdt/ in Ubuntu 12.04.2 LTS and works fine!
First, I downloaded it from www.eclipse.org/downloads/, choosing Eclipse IDE for C/C++ Developers.
I save the file somewhere, let´s say into my home directory. Open a console or terminal, and type:
>>cd ~; tar xvzf eclipse*.tar.gz;
Remember for having Eclipse running in Linux, it is required a JVM, so download a jdk file e.g jdk-7u17-linux-i586.rpm (I cann´t post the link due to my low reputation) ... anyway
Install the .rpm file following http://www.wikihow.com/Install-Java-on-Linux
Find the path to the Java installation, by typing:
>>which java
I got /usr/bin/java. To start up Eclipse, type:
>>cd ~/eclipse; ./eclipse -vm /usr/bin/java
Also, once everything is installed, in the home directory, you can double-click the executable icon called eclipse, and then you´ll have it!. In case you like an icon, create a .desktop file in /usr/share/applications:
>>sudo gedit /usr/share/applications/eclipse.desktop
The .desktop file content is as follows:
[Desktop Entry]
Name=Eclipse
Type=Application
Exec="This is the path of the eclipse executable on your machine"
Terminal=false
Icon="This is the path of the icon.xpm file on your machine"
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE
Name[en]=eclipse.desktop
Best luck!
I was in the same boat. Installed Eclipse, realized need CDT.
sudo apt-get install eclipse eclipse-cdt g++
This just adds the CDT package on top of existing installation - no un-installation etc. required.
http://www.eclipse.org/cdt/
^Give that a try
I have not used the CDT for eclipse but I do use Eclipse Java for Ubuntu 12.04 and it works wonders.