Page 1 of 2


Posted: Mon Jan 16, 2017 5:45 am
by MikeG58
I love my new Raspberry Pi 3. It has renewed my interest in electronics and programming.

I admit, to being rusty in C++. I see from previous post that most recommend the Geany IDE for C++ programming on the Pi. That's fine, but Geany doesn't look much more to me, than a text editor. How does one discover what's inside the GCC libraries without a full-fledged IDE such as Eclipse or Visual Studio?

Also, what is the name of the GUI used by the Raspberry Pi? And what are the basic tools to program the GUI with C++?

Re: C++ IDE

Posted: Mon Jan 16, 2017 8:11 am
by ghans
There is also Net::Beans. The GUI ("PIXEL") is surely based on GTK+. You might want to look into GTKmm , which is
the C++ "wrapper" of GTK++.


Re: C++ IDE

Posted: Mon Jan 16, 2017 8:52 am
by flatmax
I like to use the Codeblocks and codelite IDEs.

For programming GUIs, I have written a very simple set of header files which allows you to create GUIs.
Check out gtkIOStream, perhaps this example : ... ample.html
That example shows you how to put labels into a GUI and a quit button.

GTKIOStream is all based on output (and in some cases input) streams - similar to cout.
So to make a gui, you stream labels, buttons and most other GUI widgets into boxes. The boxes (HBox and VBox) allow you to pack widgets vertically and horizontally ... you can even pack boxes into boxes !

Here is a simple example. First create labels :
Labels l;
Put text labels into the labels class :
l<<"this is a label";

Create a top window :
Window topWindow;

Put the labels into the top window and show it :
topWindow << l;;

As simple as that !


Re: C++ IDE

Posted: Thu Jan 19, 2017 8:06 pm
by MikeG58
:D Thank you ghans and flatmax. I can see, that by using this forum, I'm going to receive lots of good help.

I did remember after asking what the Raspian GUI was called. Yeah, Pixel.


Are there certain libraries, include files, headers, you have to use in your C++ code in order to create the windows, as well as stream things to them?

:o Oh, sorry, flatmax. I see that you have included the necessary headers.

When I have time this evening, I'll give it a shot.


Re: C++ IDE

Posted: Thu Jan 19, 2017 8:30 pm
by MikeG58
:D :D :D Oh, yeah, flatmax,

Exactly what I was looking for.

Trying to find exactly what I need for programming the Raspberry Pi, is a effort that has exploded in many unforeseen directions. It appears that the learning curve is steep, but, that's the kind of challenge I enjoy.


Re: C++ IDE

Posted: Sun Jan 29, 2017 1:58 pm
by flatmax
Nice to hear !

The gtkiostream headers are literally just headers, which means all you have to do is include them in your code and make sure the preprocessor (g++) can find them (may be necessary to use the -I flag in the g++ args to path to where the headers are installed). If you create the deb package which is distributed with the source code, then you can use pkg-config to set this up for you in a Makefile.

There is also an "EmptyProject" in the root directory which is an autotools empty project which has an setup to search for the pkg-config file and built the project in a standard autotools way - if you want to go down that path!

The c++ classes which you will use is resolved down to standard gtk C code by the g++ preprocessor. So it is actually a nice and simple way to programatically construct GTK GUIs which is mostly equivalent to writing the gtk C code yourself - except elegantly simple to use.


Re: C++ IDE

Posted: Sun Feb 05, 2017 4:08 am
by binaryman
This is a reply to anybody wanting to know the best C++ IDE and compiler for Raspberry PI I have 29 years experience as a self employed C/C++ programmer. I started in 1988 with Borland tools. The best Linux development environment in my opinion is

JDK 8u121 with NetBeans 8.2 Here is a link ...

#1 Its free
#2 It runs under windows
$3 Its Open source
#4 The net beans IDE is used by major corporations such Microchip's MPLAB
#5 It integrates with the Raspberry PI so that it seems like compiling locally but it transfers everything with virtually no delay
#6 When you run the program from the Windows compiler it executes it on the remote PI and displays a local text console windows showing the Linux console stdout (standard) output of the program.

It only takes a few minutes to set it up.

A) You have to download and install JDK 8u121 with NetBeans 8.2
B) You have to add the C++ plugin from the Tools | Plugin menu
C) It comes with a Raspberry PI hello world demo program - You just add the IP address, username and password to the project. When you click run build it goes.

In my opinion this Netbeans has become the Linux of IDE environments - I mean that how Linux is the most successful open source operating system, this netbeans is by far the best way to develop software. I use compilers like the embarcadero C++ builder and pay for the updates - It doesn't even support Linux.

If anybody needs help getting a project to compile and run please reach out and I will help you get started.

Saint Louis, Missouri USA

Re: user-friendly C++ GUI IDE

Posted: Sat Jan 12, 2019 9:31 am
by dsyleixa123
I found that requests about user-friendly C++ GUI programming tools have been posted earlier in this forum, such as Borland C++ Builder for Windows - are there some updates meanwhile?
When starting a new project, a form is provided where to drag and drop object elements (buttons, check boxes, radio buttons, drop-down menus, text strings, dialog windows), and all the GUI window form and widget code for events (onClick, onKeyPress, onKeyUp,...) is generated automatically when chosen or selected.
(IIRC, this Borland program once costed less than 100 $ for non-commercial use, and I certainly would pay such an amount also for such a Linux based program too).

Re: C++ IDE

Posted: Sat Jan 12, 2019 1:52 pm
by Heater
Why would you pay $100 dollars for a C++ IDE when there are open source IDE's for free?

See qtcreator.

I have no idea how well it runs on a Pi but it's worth a go. Normally I would do most development on a PC then move the code to a Pi for final finishing and testing.

Re: C++ IDE

Posted: Sun Jan 13, 2019 12:28 pm
by dsyleixa123
qtcreator is far too complicated as long as I observed, it does actually not provide all the features of the C++ Builder (simple installation and configuraton by starting 1 simple setup program (e.g., on the Pi), integrating all entire tools and features, intuitive graphic window and widget design by drag and drop and choosing proprietary, arbitrary object settings, AND automatic object code generation, automatic project maintainance, plus final compile/build by 1 simple key stroke, dispensing with confusing makefiles or cmake.)

Re: C++ IDE

Posted: Sun Jan 13, 2019 2:30 pm
by Brian Beuken
sorry... double post.

Re: C++ IDE

Posted: Sun Jan 13, 2019 2:34 pm
by Brian Beuken
I honestly think IDE's are totally subjective, for every single IDE someone mentions you'll find somone who hates it.. IDE's vary mainly on what language(s) they are intended to support and also what target systems they are targetting. Full screen graphic projects for example are impossible to debug on an IDE that can't be seen while the app is running.

Also what you find yourself doing every day. When I was working on Nintendo GBA and DS, I learned to love Codewarrior, but I did eventually recover when I started to work on sony systems with VSI.

But I'll chip in my two cents worth as a coder for 35 years working on everything under the favourite these days is.....

Visual Studio.... yes, its windows, yes its huge and clunky, but when you add plug ins to it, such as Visual GDB and hook it up to your Rasberry, there's nothing easier. Edit,compile and back up your work as you code, then view, debug, profile, your work as its running on Pi with its own dedicated screen and input systems. It can't be beat. You should try it.

If you must use a Pi based IDE, Code::Blocks is the best I've tried so far,but if you are debugging a full screen graphic program, its hard work which is why I much prefer a PC based IDE. There's a lot Pi based IDE's but everything else I tried was just oversimplified or trying too hard to be different from VS, that it became too much of a new learning process.

but whatever you use, enjoy it, make sure it lets you edit easilty, set up libraries and asset chains easily and saves your work as you go so that the inevitable crashes don't cause you to lose your work.

Re: C++ IDE

Posted: Sun Jan 13, 2019 2:37 pm
by dsyleixa123
actually my question was about a RaspberryPi GUI IDE for d+d GUI interface windows design with automatic code generation (!) for all the windows elements/widgets (such as Borland C++ Builder for Windows). I actually doubt that code::blocks provides that.

Re: C++ IDE

Posted: Sun Jan 13, 2019 4:09 pm
by Heater
qtcreator is far too complicated as long as I observed...
qtcreator is complex. However I don't see that it is any more complex than most of the such IDE's I have used, Visual Studio, Eclipse, IntelliJ, Quartus... Being huge and complex seems to be what graphical IDE's are all about. does actually not provide all the features of the C++ Builder (simple installation and configuraton by starting 1 simple setup program (e.g., on the Pi), integrating all entire tools and features, intuitive graphic window and widget design by drag and drop and choosing proprietary, arbitrary object settings, AND automatic object code generation, automatic project maintainance, plus final compile/build by 1 simple key stroke, dispensing with confusing makefiles or cmake.)
qtcreator is easy enough to install. Contrary to what you say there qtcreator does have:

1) Intuitive graphic window and widget design by drag and drop

2) Choosing proprietary, arbitrary object settings.
(Actually I don't know what you mean by "proprietary" here.)

3) Automatic object code generation.

4) Automatic project maintenance.

5) Final compile/build by 1 simple key stroke.

6) Dispensing with confusing make files or cmake.

Here is a nice overview of QtCreator features:

Personally I'm very happy using Visual Studio Code for developing C++ and other languages (Not to be confused with Visual Studio). If I need a GUI it's created as a web page that can viewed in the browser or as an Electron application. Using web technologies removes all the problems of creating cross-platform graphical applications.

Each to his own I guess.

Re: C++ IDE

Posted: Sun Jan 13, 2019 4:41 pm
by dsyleixa123
ok - if that's so then I certainly I have to stand corrected.
(by "proprietary" I meant, e.g. for buttons: an event issued once either by button-up or optionally by button-double-click and so on, each button by it's own events)

Visual Studio for Windows I don't know, but perhaps that was similar to Borland C++ Builder.

How can qtcreator be installed on the Pi? (I have an old Pi2 with Scratch and a HDMI screen, and besides that just a Windows 7 Notebook)

But IIUC, one needs 2 different programs one after another, qt designer and qt creator, no integrated features. And if one has added e.g. 2 Buttons by d+d to the designer form, no code is generated automatically to a source code file, not for either button, and not for either events.

Re: C++ IDE

Posted: Mon Jan 14, 2019 3:55 pm
by swampdog
How can qtcreator be installed on the Pi?

Code: Select all

$ sudo apt-get install qtcreator
I'm not sure how much mileage you'll get out of it without an rpi3 though!

One thing I did notice when I just installed it here was it didn't auto detect a compiler so..
Compiler Path=/usr/bin/g++

"Welcome" [New Project]->"New Qt Widgets Application" (etc).

The next bit was confusing in that clicking on "Design" down the left panel is impossible because it's greyed.
Tools->Form Editor->Switch Source/Form
solves that (ie shift-f4) with "mainwindow.cpp" open (aka "mainwindow.ui")
and now you can create forms.

ctrl-r to build and run (build menu).

That's the limit of my QT programming knowledge. I've only used it a bit for bigger cmake projects under linux mint as a glorified editor but resort to the command line for final builds.

Re: C++ IDE

Posted: Mon Jan 14, 2019 4:43 pm
by Heater

I don't recall exactly but I would be very surprised if qtcreator did not have support for button down, button up, double click etc.
But IIUC, one needs 2 different programs one after another, qt designer and qt creator, no integrated features.
You do not UC. qtdesigner is integrated into qtcreator. Sometimes it more convenient to use designer stand alone.

Re: C++ IDE

Posted: Mon Jan 14, 2019 7:46 pm
by dsyleixa123
thanks to all, that was really helpful. I obviously didn't find the correct information so far, now I'll give it a try!

Re: C++ IDE

Posted: Mon Jan 14, 2019 8:10 pm
by dsyleixa123
who knows a beginner-friendly tutorial with simple step-by-step lessons for the qtcreator, possibly in German?

Re: C++ IDE

Posted: Mon Jan 14, 2019 9:16 pm
by Heater
Google does:

I don't know how the qtcreator installation goes on the Pi but I recall that last time I used it, it came with a ton of examples, and documentation built in.

Re: C++ IDE

Posted: Mon Jan 14, 2019 9:34 pm
by dsyleixa123
yes, indeed: overwhelming tons of documents, enough to sink a ship - tbh, I don't understand a single word how to start and what to do with all that :shock:
The link you posted unfortunately also is insanely badly explained and completely incomprehensible :?
So just 1 really beginner-friendly, easily comprehensible, and extremely detailed step-by-step lecture course or textbook in German is required :geek:

Re: C++ IDE

Posted: Wed Jan 16, 2019 9:27 am
by dsyleixa123
after having looked during the last 2 days through sources and made some programming attempts, I think I have to resign about the qtcreator.
The qtcreator is really a monster which is probably not suitable to work with directly on the Pi: 1st, it's insanely slow until a window opens , and 2nd, it uses weird proprietary data types (e.g. qstring: what the heck is that?? in C we have cstrings, and in C++ we have std::string !!) plus proprietary converting functions from "qstring" to int or double or whatever and reverse (why that?? in C we have all that already!) but 3rd, the confusing overburdening tons of sources and features obstruct the view of the simplest operating steps, and so it's absolutely not suitable for me as a beginner like e.g. Borland C++ Builder was.
And additionally, which is probably crucial, still missing suitable beginner-friendly tutorials in German. So e.g., I still haven't managed even to start building a form with a button, which - when pressed - then makes a message box appear showing the simple text " hello world [OK] ", which actually was a snap using the Borland C++ Builder.

Having said that, I'm afraid, a different, simplified, and downsized C++ GUI IDE design program is required, providing German tutorials, and suitable both for beginners and hobbyists and also for the processing speed and the capabilities of the Pi (Borland C++ Builder once ran on Windows98 PCs, far slower than a today's Pi, driven by an i486 single-core, IIRC at 66 MHz, 16 MB RAM, 250 MB HD, I once worked with that when I was a student ;) ).

Re: C++ IDE

Posted: Wed Jan 16, 2019 7:16 pm
by Heater

That is a shame. I suspected qtcreator might be a bit slow on a Pi. When I have developed Qt code in the past I did it on my PC and then when it was tested and working move the source to the Pi, or whatever target, and rebuild it with qmake on the command line.

Qt has it's own container classes and such, like qstring, because when Qt was first created there was no STL, there was no std::string etc. Qt was designed from the beginning to be a cross-platform GUI tool kit, unlike Borland C++ Builder for example, so it had to provide it's own standard that worked everywhere with all kind of compilers. Of course ripping all that out and changing to stl:: twenty years later is not going to be simple if there is any plan to do it at all.

I believe qstring has advantage still when processing unicode text. Some say it is faster than std::string but I have never warried about that.

I too used to develop GUI code on a single core 486 back in the day. Using Qt. Seems our compilers have gotten a lot bigger and slower since then.

Sadly I don't know of any other cross-platform GUI design tools. You might like to take a look at Glade: and use Gth as your GUI tool kit.

There is always the option of no using a GUI form builder. Just write the code yourself. Then any lightweight editor will do. Vim works very well with C++.

One might also wonder why build a GUI application in C++ now a days anyway? It's so much easier to create forms and GUI things in a web page and display it with your browser. That has the great advantages of being usable remotely as well, and does not require any platform specific or cross-platform compilers and tools. Also I'm sure tutorials and documentation for creating GUI web apps in German are plentiful :)

Re: C++ IDE

Posted: Wed Jan 16, 2019 8:45 pm
by dsyleixa123
thanks for your condolence! ;)
I'm afraid web forms are no option at all, that is unexplored terrain to me (just using some c+p code for the esp8266 webserver), and additionally I needed my programs locally also when no wifi is available. OTOH, using just the standard console and key strokes is too poor for the long run: I have a touch screen at my Pi, and mouse buttons and widgets to show up several things are actually wishful. For some extremely simple things perhaps the gtkiostream thing mentioned above might be a makeshift replacement, but I don't know, it looks as if its not widly used and barely maintained, tbh. Or perhaps it's easier to purchase a very cheap and small Windows notebook and develop my stuff over there using again my Borland tools :(
But maybe a good German textbook on qtcreator once will fall from the sky - then it perhaps would be worth while buying a Pi3. To make my GUI development quick and intuitive by drag+drop is still crucial though.

Re: C++ IDE

Posted: Wed Jan 16, 2019 9:27 pm
by Heater
qt is widely used to create GUI for small screens on all manner of embedded systems. Which is basically what a Pi with a touch screen is. Of course the developers of such things develop their code on a PC not the target device.

Now you remind me. When I used Qt on the Pi I did not use X Windows. Rather I had Qt render the GUI directly to the frame buffer. This is a great solution for a dedicated single application on the Pi. No X Windows required. I also used OpenGL from the Qt app, straight into the frame buffer beautifully hardware accelerated.

If your touch screen shows up as a frame buffer on the Pi then this should all work nicely there to.