Author Topic: General IDE to learn C++ on  (Read 39157 times)

0 Members and 6 Guests are viewing this topic.

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 14132
Re: General IDE to learn C++ on
« Reply #75 on: December 29, 2021, 05:56:09 pm »
Orwell Dev-C++ installer 50,433,966 bytes (48 MB)
TDM-GCC 10.3.0 full installer 80,474,875 bytes (76.7 M)
Total  130,908,841 bytes (124.8 MB)

or you could go with the even smaller download of the Embarcadero DEV-C++ fork which includes TDM-GCC 9.2.0, if you trust Embarcadero . . .

Dev-C++ keeps the console open by default:

 Hello, World!

--------------------------------
Process exited after 0.02145 seconds with return value 0
Press any key to continue . . .

Quote from: Dev-C++ Help
Q: Programs created with Dev-C++ show the line "Process exited with return value X". What's going on?
This piece of text is shown when a console program ran via Dev-C++ exits. The host that runs your console program (ConsolePauser.exe) prints this code. Dev-C++ does NOT add any code to your programs to print this. This feature is quite useful because you can see console output before closing. You can remove it by unticking "Tools >> Environment Options >> General >> Pause console programs after return".
 

Offline djsb

  • Super Contributor
  • ***
  • Posts: 1122
  • Country: gb
Re: General IDE to learn C++ on
« Reply #76 on: December 29, 2021, 07:24:54 pm »
Just to mix it up a little, I'm giving Visual Studio Community 2022 a go. This is mainly because the book mentioned  earlier uses FLTK for it's GUI examples later on and FLTK comes with ready-made solution files for Visual Studio.
Visual Studio really isn't so scary once you give it a try. I'm going to give the hello_world example a spin and see how I get on.





PS The hello_world example from chapter 2 of the book compiles OK and shows the message in a popup window in VS 2022. I didn't even have to explicitly tell the IDE where to find the header file. It just found it itself.



https://bumpyroadtocode.com/2017/08/29/how-to-install-and-use-fltk-1-3-4-in-visual-studio-2017-complete-guide-2-0-no-cross-contamination/

https://stackoverflow.com/questions/70401545/how-to-use-fltk-graphic-library-with-visual-studio-community-2022-for-c-proj
« Last Edit: December 31, 2021, 09:00:13 am by djsb »
David
Hertfordshire, UK
Retired University Electronics Technician, London, PIC16/18, CCS PCM C, Arduino UNO, NANO,ESP32, KiCad V10+, Altium Designer 21.4.1, Alibre Design Expert 28 & FreeCAD beginner. LPKF S103,S62 Operator, Electronics instructor. Credited KiCad French to English translator.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17813
  • Country: fr
Re: General IDE to learn C++ on
« Reply #77 on: December 29, 2021, 07:45:30 pm »
Orwell Dev-C++ installer 50,433,966 bytes (48 MB)
TDM-GCC 10.3.0 full installer 80,474,875 bytes (76.7 M)
Total  130,908,841 bytes (124.8 MB)

or you could go with the even smaller download of the Embarcadero DEV-C++ fork which includes TDM-GCC 9.2.0, if you trust Embarcadero . . .

Yeah. OTOH, VS build tools for C and C++ (so only the command-line tools): 2.6 GB. =)
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 11291
  • Country: fi
Re: General IDE to learn C++ on
« Reply #78 on: December 29, 2021, 08:30:20 pm »
I had the SAME issue and that was in March of this year. WTF?!! How am I going to rewrite the code when the &^@#$%ing window closes on me?! FFS, I am going backwards, not forwards, and I do have other things to do, so FTS!  Which person in this thread has not had similar ideations at some time?
Me certainly.

Me too, we all have those moments. It only becomes an issue if you get fixated on the problem so much that just solving it is not enough. This is where people deal with differently. Some will act like this, "oh I see, there was this box to tick, me stupid, d'oh." Others will go, "oh I see, there was this box to tick, what crappy UI design, d'oh". I'm in the latter, but both will work if you just can go on.

But if you decide to give up because of this and go on ranting about it on the Interwebz, you are just wasting your own time; you could be learning C++ instead.

Learning any programming language using any toolset is full of moments like this. If you get stuck for longer than a few hours on them, if they become your painpoints which require lengthy discussions, reaching your actual target is doomed.

Really, most important is just keep the ball rolling. Pick any tool. Heck, even use STM32CubeIDE and Arduino I supposedly so much hate. Use nctnico's favorite, Eclipse, which I also hate, but it's really fine. They are all good enough tools that get the job done.
« Last Edit: December 29, 2021, 08:32:21 pm by Siwastaja »
 
The following users thanked this post: nctnico

Online nctnico

  • Super Contributor
  • ***
  • Posts: 30302
  • Country: nl
    • NCT Developments
Re: General IDE to learn C++ on
« Reply #79 on: December 29, 2021, 09:52:10 pm »
Actually... if you install GCC for WIndows (Mingw is the best choice IMHO) then STM32CubeIDE will also work for creating programs that run on a PC. After all STM32CubeIDE is just Eclipse with a piece of ST wallpaper stuck onto it.

As a choice of IDE I'd advise to look into Visual Studio code nowadays. I see a lot of programmers around me (with ages from below 20 to over 80) using Visual Studio code. There is also a large ecosystem with plugins for VS code and for some languages (VHDL for example) already more choices than ever existed for Eclipse. It wouldn't surprise me if MCU vendors are switching to it as well in the near future. All in all I have a strong feeling the days of Eclipse are numbered.
« Last Edit: December 29, 2021, 10:07:40 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 18908
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: General IDE to learn C++ on
« Reply #80 on: December 29, 2021, 10:42:52 pm »
But how are you going to test your code? Step through it line by line with a debugger for example to see what is happening with the variable values. That is much easier to do on a PC based IDE than on a microcontroller. Likely Eclipse CDT and Visual Studio code offer a way easier to use workflow compare to Microchip's own IDE. Last time I had to program for a PIC processor I used Eclipse CDT instead of Microchip's own environment.

FFS read!

Lets start again for the hard of hearing (and intellect!):

while my ultimate aim is to program on a micro-controller I am following (or will when I get the time to set this up) a book with examples to use on a PC. The book recommends VS but does point out that this is 2005 (the guy had vision and knew that the book would be read years later when the IDE would be totally different and a mess). So if I try to follow the setup described notthing happens. So clearly as the author anticipated the IDE in 2005 has now changed to the point that it's more work to get the IDE to work than do the example.

Therefore I am looking for an IDE that is as simple to use as VS was in 2005 to carry out the examples as intended on a PC!

Once I have got to grips with the language yes my target will be embedded, for now I want a hassle free IDE that lets me test the code as I need at least one first little test program to work before I can figure if it's me or the IDE.
Don't try to run before you can walk. Also don't expect a book from 15 years ago to be accurate. The C++ standard has changed in the meantime as well so some examples in the book could use constructs that throw an error instead of a warning.

To get going with Visual Studio Code:
https://code.visualstudio.com/docs/setup/windows
https://code.visualstudio.com/docs/cpp/introvideos-cpp

Found these with a website called Google.
The book is for C++14 and I think maybe a bit beyond. It is just that it started life in it's first edition earlier and I suspect that is why the comment about 2005 was dropped as they anticipated more editions and that the IDE would change.

How much of the original remains versus new material in the second edition I don't know.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 13120
  • Country: us
Re: General IDE to learn C++ on
« Reply #81 on: December 29, 2021, 11:23:04 pm »
I had the SAME issue and that was in March of this year. WTF?!! How am I going to rewrite the code when the &^@#$%ing window closes on me?! FFS, I am going backwards, not forwards, and I do have other things to do, so FTS!  Which person in this thread has not had similar ideations at some time?
Me certainly.

Me too, we all have those moments. It only becomes an issue if you get fixated on the problem so much that just solving it is not enough. This is where people deal with differently. Some will act like this, "oh I see, there was this box to tick, me stupid, d'oh." Others will go, "oh I see, there was this box to tick, what crappy UI design, d'oh". I'm in the latter, but both will work if you just can go on.

This is really a matter of your perspective on the task at hand. Whether you want to run your program, or whether you want to debug it. If you are simply running the program, you do most likely want to see the output in the console window. However, if you are debugging it, it would be a pain to have to keep closing the console window every time you stop debugging.

Both options are present on the Debug menu:

 

Offline gmb42

  • Frequent Contributor
  • **
  • Posts: 335
  • Country: gb
Re: General IDE to learn C++ on
« Reply #82 on: December 29, 2021, 11:58:36 pm »
Here it goes:

Blimey!

As noted elsewhere, the size of the actual IDE portion of that download is relatively small, it's all the toolchain bits that make up the majority for x86, x64, all the Windows headers, debuggers, Windows SDK's.
 

Offline Vtile

  • Super Contributor
  • ***
  • Posts: 1149
  • Country: fi
  • Ingineer
Re: General IDE to learn C++ on
« Reply #83 on: February 06, 2022, 05:25:16 pm »
For number 4. One could include a "wait key press" instruction as the last line of the code snippet, if there is no instruction which waits user interaction.

I do not have a word for other numbers as I do try to stay away C(++) toolchain acrobacy. Years ago there was devc++ ide for windows, maybe it is still maintained.

Edit. Didn't notice that there is 4 pages, mobile version of site is not the most informative one.
« Last Edit: February 06, 2022, 06:08:55 pm by Vtile »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 10089
  • Country: us
Re: General IDE to learn C++ on
« Reply #84 on: February 08, 2022, 03:29:52 am »
I bought the Fourth Edition of Stroustrup's "The C++ Programming Language" book.  It's a big heavy thing, 1345 pages!

I am going to make one last ditch effort to learn enough of the language to more or less 'like' it.  This isn't my first attempt, I have been trying to like it for 20 years or so.  I just don't see the advantages and that's probably because my projects are small.  I like C, I really prefer Fortran if the application is number crunching and Pascal is my all-time favorite for application programming.

I have an old Dell Inspiron laptop and I just installed Mint Linux with the Cinnamon desktop.  I'll use 'gedit' for the editor (with Alt-Y to shut off syntax coloring) running in one terminal and build/execute the code from a second terminal and the command line.  This is a simple and effective way to develop code on Linux.  I may progress to using Makefiles but they probably aren't necessary for book examples.  I do know how to use 'make' so if it comes up there won't be too many stumbling points.

If I'm going to write command line code, I really prefer to do it on Linux.  Sure, I have Visual Studio and it works fine but it seems a little heavy for snippets of code.  'gedit' is a fine editor when the alternative is 'vi' or 'nano'.  'geany' is another fine editor.  I think Eclipse would be overkill for this evolution but I like the fact it keeps track of projects in a workspace.  It has improved greatly over the years.

If I change my mind and use Win10, I will definitely use Visual Studio.  It creates a project template as a starting point for every project.  Visual Studio works very well and I don't find it terribly unwieldly.

If I install VNC Server on the laptop, I can just let the laptop sit on a shelf in the back room and interact with is using VNC Client from my Win10 workstation (or any other machine).  This works quite well and I do it all the time with Raspian on the Raspberry PI.

Actually, an Intel NUC would be perfect for this application.  Maybe later on...

So many choices...
« Last Edit: February 08, 2022, 03:55:56 am by rstofer »
 

Offline DiTBho

  • Super Contributor
  • ***
  • Posts: 5098
  • Country: gb
Re: General IDE to learn C++ on
« Reply #85 on: February 08, 2022, 03:58:44 am »
.. is there anything that doesn't require {GTK2, GTK3, kde}?
anything (open)motif-based?

Yes! despite being a minimalist Motif/X11 plain text editor, NEdit features significant support for programmers including syntax highlighting, macro language, and streamlined keyboard navigation.

I like NEdit combined with auto-tag, this way it automatically generates tags to bookmark functions.
I will integrate Scintilla some day ...

Anyway, it flawlessly works with C, but it's rather clumsy with C++
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Online ledtester

  • Super Contributor
  • ***
  • Posts: 4219
  • Country: us
Re: General IDE to learn C++ on
« Reply #86 on: February 08, 2022, 06:22:19 am »
I bought the Fourth Edition of Stroustrup's "The C++ Programming Language" book.  It's a big heavy thing, 1345 pages!

Depending on your goals you might consider starting with Stroustrup's "A Tour of C++".

C++ has a a long history and it's encumbered with a lot of "baggage" so to speak. The the thinking on best practices in C++ has evolved quite a bit over the years. I've heard the leaders of C++ (Bjarne, Herb Sutter, et. al.) express the sentiment that they feel there is a much simpler language that is struggling to express itself within C++.

The CppCon talks on youtube are a good way to keep abreast of how this modern view of C++ is evolving - especially the ones by Bjarne and Herb.
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 18908
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: General IDE to learn C++ on
« Reply #87 on: February 08, 2022, 07:56:01 am »

Depending on your goals you might consider starting with Stroustrup's "A Tour of C++".

C++ has a a long history and it's encumbered with a lot of "baggage" so to speak. The the thinking on best practices in C++ has evolved quite a bit over the years. I've heard the leaders of C++ (Bjarne, Herb Sutter, et. al.) express the sentiment that they feel there is a much simpler language that is struggling to express itself within C++.

The CppCon talks on youtube are a good way to keep abreast of how this modern view of C++ is evolving - especially the ones by Bjarne and Herb.


I have that book too but clearly not a book for a beginner like me as you need a thorough background in programming.
 

Offline m98

  • Frequent Contributor
  • **
  • Posts: 672
  • Country: de
Re: General IDE to learn C++ on
« Reply #88 on: February 08, 2022, 01:52:37 pm »
I can recommend JetBrains CLion if a commercial IDE is an option. Quite intuitive to learn, works nice with CMake and is also great for embedded.
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 18908
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: General IDE to learn C++ on
« Reply #89 on: February 08, 2022, 02:00:09 pm »
Just need something that when I compile a program and it does not work I know it is because of my code and not some sillyness in the IDE.

Going to build a separate machine to run Linux on so maybe I'll get more sense on that.
 
The following users thanked this post: eti

Offline alexanderbrevig

  • Frequent Contributor
  • **
  • Posts: 706
  • Country: no
  • Musician, developer and EE hobbyist
    • alexanderbrevig.com
Re: General IDE to learn C++ on
« Reply #90 on: February 08, 2022, 03:57:59 pm »
Just need something that when I compile a program and it does not work I know it is because of my code and not some sillyness in the IDE.

Neovim. Thank me later.
No really. Give it a day and fall in love.
 
The following users thanked this post: Ed.Kloonk

Offline Ed.Kloonk

  • Super Contributor
  • ***
  • Posts: 4000
  • Country: au
  • Cat video aficionado
Re: General IDE to learn C++ on
« Reply #91 on: February 08, 2022, 10:23:28 pm »
Just need something that when I compile a program and it does not work I know it is because of my code and not some sillyness in the IDE.

Neovim. Thank me later.
No really. Give it a day and fall in love.
Interesting project.
iratus parum formica
 

Offline nigelwright7557

  • Frequent Contributor
  • **
  • Posts: 725
  • Country: gb
    • PCBCAD software
Re: General IDE to learn C++ on
« Reply #92 on: August 02, 2022, 02:33:59 pm »
VS may be fine but the OP explicitely stated that he didn't want it. This didn't look very hard to get. :popcorn:
VS community is a HUGE install, even if you selectively disable everything not strictly needed for basic C++ dev (which takes a while and you're not even sure what will be needed or not), because by default it's even more huge. Gigantic.

Despite VS not being wanted I would totally disagree with that stance.
VS is an incredible piece of software with intellisense to guide you.
I have used it for 20 years and done some huge programs with it.
 

Offline emece67

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: General IDE to learn C++ on
« Reply #93 on: August 02, 2022, 03:29:55 pm »
.
« Last Edit: August 19, 2022, 05:01:12 pm by emece67 »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 10089
  • Country: us
Re: General IDE to learn C++ on
« Reply #94 on: August 02, 2022, 03:33:26 pm »
Just need something that when I compile a program and it does not work I know it is because of my code and not some sillyness in the IDE.

Going to build a separate machine to run Linux on so maybe I'll get more sense on that.

Linux is a great development environment.  Get pretty good with makefiles and you can build some large projects with files in separate directories and all that kind of thing.  The problem is, Linux may not be the target.  If Windows comes into the deal at all, it is probably better to develop on Windows and the Visual Studio Code (and let's be clear, this isn't Visual Studio with all the compilers and such) is a pretty nice IDE.  There is a difference between Visual Studio and Visual Studio Code although the IDE portion of Visual Studio looks a lot like Visual Studio Code.

Mostly, we build console apps (at least that is the case for me) and those will run in the terminal window of VSC where you can see the results and any error messages.  And, yes, they will be YOUR errors, not the IDEs.  You have to figure that the millions of people using VSC will have discovered any issues long before you came to play.

I also like Eclipse, mainly because it has a Fortran plug-in.  Again, the command line output is at the bottom of the screen.  This is a very workable IDE and used by MANY programmers.
« Last Edit: August 02, 2022, 04:06:36 pm by rstofer »
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 30302
  • Country: nl
    • NCT Developments
Re: General IDE to learn C++ on
« Reply #95 on: August 02, 2022, 03:51:44 pm »
VS Code seems to be the popular IDE 'du jour' but what I like about Eclipse CDT is that it has many goodies out of the box. In order to get the same level of functionality from VS code, you'll need to install several plugins for which you need to know which ones are good and which aren't. Not very helpfull if you are a novice.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 10089
  • Country: us
Re: General IDE to learn C++ on
« Reply #96 on: August 02, 2022, 04:05:17 pm »
On Linux, I use gedit or geany as the editor and a separate terminal for build and execution.  So, two windows open on the screen.  It doesn't get easier than this.

The Raspberry Pi makes a pretty decent Linux environment and a Pi 400 is very convenient if desk space is available.  The cool part is to set up VNC and run the whole Linux process from a Windows workstation, graphics desktop and all.  Running a Pi headless is very workable and there is no reason to give up desk space for another monitor/keyboard/mouse setup.  Getting started may require a monitor/keyboard/mouse or not.  If you can use a wired network connection (because the new headless Pi won't have the WiFi ssid/password) and your router will give you the IP address, you can even start headless.  Search Google for ideas about getting the Pi IP address.  Turns out my HP desktop has HDMI input so I can use the same display for the All-In-One or the Pi.  Still have to diddle around with the keyboard/mouse.  I guess I could use a KVM switch but I'm lazy.  I only need the Pi keyboard/mouse for a couple of minutes to set up WiFi and VNC.




 

Offline eti

  • Super Contributor
  • ***
  • !
  • Posts: 1801
  • Country: gb
  • MOD: a.k.a Unlokia, glossywhite, iamwhoiam etc
Re: General IDE to learn C++ on
« Reply #97 on: October 12, 2022, 06:44:30 pm »
I use Ubuntu as my OS. I installed Windows 10, 2 days ago, to write a C# forms application... wow... the amount of time it took to JUST get the OS to behave, to ACTUALLY SHUTDOWN (messed around with the "Intel Management Engine Interface" driver for over an hour and the machine still wouldn't power off, black screen, fans whizzing) - then the next day, just as I was doing something it shut itself down!

So yeah, a vote for Linux is a deffo! g++ for the win!
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3914
  • Country: it
Re: General IDE to learn C++ on
« Reply #98 on: October 14, 2022, 04:56:25 am »
Uh, i missed this.
If i had to i'd use the Qt Ide, but that's because i'm already using Qt so i have the IDE, compiler, debugger already in place. In Qt i can create a c++ project without using a single Qt feature if i want to
Earlier i would have used visual c++. Same reason, i was already using C# to do .net applications so i already had visual studio installed
Generic IDE, probably eclipse for as much as i dislike eclipse it just works(tm) for C++, or VSCode if i ever manage to understand how to make it work like an ide and interact with a debugger
« Last Edit: October 14, 2022, 04:57:56 am by JPortici »
 

Offline orb

  • Regular Contributor
  • *
  • Posts: 71
  • Country: pl
Re: General IDE to learn C++ on
« Reply #99 on: January 12, 2023, 09:34:38 am »
Windows: you can use cygwin + notepad++.
Linux: gcc + geany.
Android: termux (clang) + quickedit.

Termux is a very powerful environment, I use it for python too. I used VS a long time ago, because it is a good option for programming in the windows api.
« Last Edit: January 12, 2023, 09:39:54 am by orb »
I came here for a while.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->