dsyleixa123
Posts: 392
Joined: Mon Jun 11, 2018 11:22 am

Re: C++ IDE

Thu Jan 17, 2019 9:24 am

yes, actually also my former Borland Turbo Pascal (with objects) didn't work on Windows, just DOS. But now I am using always the GUI desktop (Pixel, XWindows) feat. multiple resizeable windows, so an XWindows design application by d+d is required.
I'm curious if one might port the Borland C++ Builder development code to Linux... :roll:

dsyleixa123
Posts: 392
Joined: Mon Jun 11, 2018 11:22 am

Re: C++ IDE

Sat Jan 19, 2019 11:03 am

just resurrected my Borland C++ Builder 5:

Just dragging 2 buttons to the form, label them ("click me" , "quit"), and choosing "onClick" for either button from the event context menu,
and after that everything is created automatically

- one simply had to add
ShowMessage ("Hello World!"); // insert this line into 1st button function body
Application->Terminate(); // insert this line into 2nd button function body

[F9]: compile, build and run!

That's it!
That way it would be wishful for the Pi, too! 8-)

which would be the steps for the qtcreator?

Code: Select all

//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "hello_world_1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
}

//---------------------------------------------------------------------------

void __fastcall TForm1::Button1Click(TObject *Sender)
{
   ShowMessage ("Hello World!");   
}

//---------------------------------------------------------------------------

void __fastcall TForm1::Button2Click(TObject *Sender)
{
    Application->Terminate();       
}
PS
download sources: https://winworldpc.com/product/borland-c-builder/6x

Heater
Posts: 13264
Joined: Tue Jul 17, 2012 3:02 pm

Re: C++ IDE

Sat Jan 19, 2019 6:30 pm

Pretty much the same as I remember from the last time I used qtcreator.

I think we determined already that the Pi does not have the memory space or horse power to run qtcreator nicely. As I said, I would develop the GUI on a PC then move the sources to the Pi and rebuild with qmake. That worked nicely last time I was doing that kind of thing.

dsyleixa123
Posts: 392
Joined: Mon Jun 11, 2018 11:22 am

Re: C++ IDE

Sat Jan 19, 2019 6:38 pm

No way to use qtcreator without a good German tutorial - I do not even know where to start and/or to proceed (even if it worked faster).
As I use Linux just on my Pi, there is no other way for developing.
For C++ Builder on my PC instead I meanwhile even managed to remote-control an Arduino by buttons in a form (via USB), thanks to a good programming guide.
https://github.com/dsyleixa/Borland-Cpp ... ontrol.jpg
No idea how to do that with the qtcreator monster :(

Heater
Posts: 13264
Joined: Tue Jul 17, 2012 3:02 pm

Re: C++ IDE

Sat Jan 19, 2019 9:20 pm

I guess you are stuck in Borland/Windows world forever then. Sadly I don't have any alternative suggestions.

Except....

Do it the easy way. Don't create a GUI application. Create your GUI in a web page. Far easier and far more flexible.

With a few dozen lines of Javascript, HTML and CSS you can have nice forms and dialogs and communication to whatever via USB or whatever. All usable from a web browser, locally on the Pi or remotely.

See node.js https://nodejs.org/en/. No, you don't need, and certainly don't want an Apache web server and PHP etc to do this.

Didn't I mention this already?

dsyleixa123
Posts: 392
Joined: Mon Jun 11, 2018 11:22 am

Re: C++ IDE

Sun Jan 20, 2019 6:08 am

Unfortunately I don't know Javascript, node.js, HTML or CSS at all (also no Python),
I am just using C(++) for programming.
But I am not stuck to the Windows/Borland world, instead for the Pi simply the beginner-friendly and handsome C(++) GUI programming tools are missing (and GUI programs should apply to common C99/C++11 datatypes and functions, no sort of qstring gibberish) - or at least beginner-friendly textbooks and lectures in German for the taming of the available Linux monsters 8)

Heater
Posts: 13264
Joined: Tue Jul 17, 2012 3:02 pm

Re: C++ IDE

Sun Jan 20, 2019 9:42 am

dsyleixa123,
Unfortunately I don't know Javascript, node.js, HTML or CSS at all (also no Python), I am just using C(++) for programming.

But I am not stuck to the Windows/Borland world, instead for the Pi simply the beginner-friendly and handsome C(++) GUI programming tools are missing (and GUI programs should apply to common C99/C++11 datatypes and functions, no sort of qstring gibberish)
If what you want to use is not available on the Pi and your refuse to look at anything else then I guess you are stuck in the Borland/Windows world of the 1990's.

Anecdote:

Only a handful of years ago I was in the same position. My idea of programming was C/C++ and assembler. I had spent decades programming in "real" languages that compiled down to real machine code, Ada, PL/M, Coral, Pascal, etc. I had no idea to stoop to any silly, slow scripting language that people used to make annoying animations in their browsers. If I needed a GUI it was done in qtcreator or such like.

Then one day the boss decided he wanted an animated data visualization that I had created in Qt to display in the browser. This thing took in a stream of data at 20 updates per second and updated a few hundred objects on screen. As none of us knew anything about web technology, JS, HTML, CSS and as what we needed to was hardly possible at the time, and as we had no desire to do it, we hired a guy to do it for us in FLASH. There was a six week deadline to have it ready for display at an expo.

I now had little to do for the six weeks before the expo. I had vaguely heard of some new web technologies. Like webgl for hardware accelerated 3D graphics in the browser, websockets for real-time communication from server to browser, the V8 JS engine to speed up JS in the browser. So, turning on the "experimental" flags in Chrome I set about experimenting with these things, just for fun...

Turned out that after six weeks I had that data visualization the boss wanted running in the browser, using JS, webgl and websockets. I had the server side support for this working in JS, collecting data from various sources and feeding it to the browser in real-time, built with node.js and Javascript.

It also turned out that the guy building the FLASH version did not get it working before the expo. but my "experiment" was working and ended being demonstrate there.

There has been no native GUI creation in my life since. I had found something much easier, more flexible, and far easier to deliver.

I was amazed to find that the silly, slow, scripting language, Javascript, was actually very sophisticated in many ways. Having languages features that C++ has only been getting recently, lambdas, closures, and so on. It's event driven programming model fit very well with what need to be done in the browser and in the server. The performance of JS was also amazingly good.

What's the point of my overly long rambling here? Well, in short, if you are proficient in C++ you can certainly pick up JS pretty quickly. You may be pleasantly surprised.

At least you will find plenty of tutorial material in German I'm sure.

jahboater
Posts: 4673
Joined: Wed Feb 04, 2015 6:38 pm

Re: C++ IDE

Sun Jan 20, 2019 10:14 am

There is a new TIOBE Index for January 2019 and it has an interesting summary of changes over the last year:

https://www.tiobe.com/tiobe-index/

TIOBE a well known measure of the popularity of different languages.

Heater
Posts: 13264
Joined: Tue Jul 17, 2012 3:02 pm

Re: C++ IDE

Sun Jan 20, 2019 11:58 am

Ah the infamous TIOBE index.

An index ranking languages in terms of complexity, difficulty and confusion. After all, these are the languages with the most tutorials, books, courses, stack overflow questions. If they were easy those would not be needed and the language would rank very low down.

Anyway, if we look at the top nine or ten we see:

Java, C, Python, C++, VB, Javascript, C#, PHP, SQL, Objective C.

All of those have their compilers, interpreters, JITs, run times written in C/C++. (Hmm...not sure about Objective C and my favorite SQL engine is written in Go, which can be compiled with GCC which is written on C++).

Ergo, I conclude that the most widely used languages, about 70%/80%, are C and C++. All the others put together hardly rate at all.

One of which also tops the list as the worlds most complex programming language. Thus confirming my theory :)

dsyleixa123
Posts: 392
Joined: Mon Jun 11, 2018 11:22 am

Re: C++ IDE

Sun Jan 20, 2019 2:37 pm

tbh, I don't want to learn different programming languages. Just a convenient and simple GUI IDE for C++ on the Pi, similar to my Borland C++ Builder I'm using (now more frequently) on my Windows notebook ;)

Heater
Posts: 13264
Joined: Tue Jul 17, 2012 3:02 pm

Re: C++ IDE

Sun Jan 20, 2019 6:44 pm

That's a shame. learning new languages can be fun. Assuming they have something different to offer. Getting them to jump on Pi projects that interact with real things in the real world is even more fun.

By the way, what is it you actually want to make with this C++ GUI, if you don't mind me asking?

dsyleixa123
Posts: 392
Joined: Mon Jun 11, 2018 11:22 am

Re: C++ IDE

Sun Jan 20, 2019 7:12 pm

The GUI is for remote controls, gauges, tracking, and dashboards for robots. All and everything programmed in C and C++.

Heater
Posts: 13264
Joined: Tue Jul 17, 2012 3:02 pm

Re: C++ IDE

Mon Jan 21, 2019 5:10 am

OK then, how about creating the GUI in a web page, with all the advantages that brings, but use C++ at the server end.
Some suggestions here: https://www.reddit.com/r/cpp/comments/4 ... framework/

Or: https://github.com/eidheim/Simple-Web-Server

Interesting that same guy gas a lightweight C++ IDE that might work well on the Pi https://github.com/cppit/jucipp

dsyleixa123
Posts: 392
Joined: Mon Jun 11, 2018 11:22 am

Re: C++ IDE

Mon Jan 21, 2019 8:42 am

thanks for your suggestion, but I have no idea about webpages, webservers, html and all that. The webserver concept doesn't look suitable for my purposes and my skills, so I'll surely stay wih C/C++, and my goal is to do show up everything in a C++ GUI interface.
gtkiostream is too unflexible (and also too poorly maintained) for that purpose, and qtcreator is missing understandable tutorials for non-professionals, whilst Borland C++ Builder is handsome but requires MS Windows, but OTOH Windows PCs have no GPIO headers like the Pi. And not even https://github.com/cppit/jucipp provides a comprehensible tutorial to me how to use that on the Pi with g++.
So again, it's still as already stated: a simpler GUI design program for the Pi is needed, or more beginner-friendly step-by-step-lessons for qtcreator, and German language is probably crucial.

Heater
Posts: 13264
Joined: Tue Jul 17, 2012 3:02 pm

Re: C++ IDE

Tue Jan 22, 2019 3:12 pm

I remembered something...

On Linux there is a thing called "Wine". Wine allows one to run Windows software on Linux computers. Which works very well for quite a few Windows applications. I use it to run the LTSpice circuit simulator from Analog Devices on Debian Linux.

Wine is Not an Emulator. Wine is an implementation of the Windows API's in a library. Which means it will only run Windows Intel x86 executables on Intel x86 Linux machines, unless you have an x86 emulator underneath as well.

Anyway, you don't have just executables, you have the source code, as Wine is just another library on Linux that means you can compile Windows C and C++ source code on Linux. This is something I tried as an experiment many years ago. I created a Win32 application in C++, with a few buttons on dialog boxes etc and successfully compiled and ran it on Linux.

So, the idea would be... If you develop your code using Borland C++ builder on a windows machine there is the possibility that you could move those sources onto a Raspberry Pi and build them there against winelib.

As it says here:

https://wiki.winehq.org/Winelib

dsyleixa123
Posts: 392
Joined: Mon Jun 11, 2018 11:22 am

Re: C++ IDE

Tue Jan 22, 2019 4:32 pm

sounds interesting, thank you!

Return to “C/C++”