Author Topic: Question about DEV-C++  (Read 905 times)

0 Members and 1 Guest are viewing this topic.

Offline CaptDonTopic starter

  • Super Contributor
  • ***
  • Posts: 1968
  • Country: is
Question about DEV-C++
« on: November 16, 2023, 02:51:15 pm »
Greetings from a code newbie. I downloaded the 48MB DEV-C++ and have set it up and really like it. I noticed during the unpacking phase that there were hundreds of files ending in .py which to me indicates a Python script. Is that correct? As such does that mean there may still be some sort of Python engine remaining on my computer that would allow me to run Python .py files? I am using the SAMS Teach yourself C++ in 21 Days book and I noticed I don't have to include the '.h' for instance <iostream> works but <iostream.h> as called out in the book results in an error. I looked in the directory containing the '.h' files and there are only maybe 20 files in that directory, however the directory where 'iostream' with no apparent suffix is located has hundreds of files. I am a circuit designer having worked for several major companies and the CPLD and FPGA work I did was mostly routing logic and I used 'Schematic Capture' laying out the building blocks I was familiar with. I spent many long years writing 8080/8085A Assembly Language and progressed to Visual Basic for some user interface on-screen radio buttons to perform dedicated switching tasks. Thanks for your inputs to my questions!! I would like to understand more about what my code writers are doing with the boards I designed to meet their hardware specifications.
« Last Edit: November 16, 2023, 02:56:15 pm by CaptDon »
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1323
  • Country: pl
Re: Question about DEV-C++
« Reply #1 on: November 16, 2023, 03:33:57 pm »
The files likely come with gdb. Gdb can use Python as its scripting language and the release in Dev-C++ seems to come with both Python interpreter library and a rich collection of scripts. Note however that there is no Python executable present. So you can’t run a Python script as-is with that; the library is meant to be used from other programs (in this case: gdb).

If a book (or any other source) even mentions things like “iostream.h”, use it as a paper weight or a support for the monitor. Or put it on your curiosity shelf, beside an 8" floppy. :D Saying it’s outdated would be a grave understatement. It describes an early version of C++ from Stroustrup, basically a prototype, which has little to do with any C++ version used in practice.

And no, it’s not only a matter of different file names. The contents of these files, the general architecture, the concepts behind it, even the language itself: all this is different.

Unfortunately I can’t help with choosing the right book anymore. But even when I could — over 8 years ago — the above warning was already accurate.

Obligatory comic from Abstruse Goose regarding learning C++ in 21 days. ;)
« Last Edit: November 16, 2023, 03:37:55 pm by golden_labels »
People imagine AI as T1000. What we got so far is glorified T9.
 
The following users thanked this post: CaptDon

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 7859
  • Country: nl
  • Current job: ATEX product design
Re: Question about DEV-C++
« Reply #2 on: November 16, 2023, 04:16:43 pm »
Oh the good old DEV-C++. This was all the rage when I was in university. I completely forgot about it.
 

Offline CaptDonTopic starter

  • Super Contributor
  • ***
  • Posts: 1968
  • Country: is
Re: Question about DEV-C++
« Reply #3 on: November 16, 2023, 09:53:56 pm »
DEV-C++ wasn't my first choice however, my 'knock about' laptop is an old Gateway ROG-450 32 bit machine. I dearly hang on to it as it has VGA and composite video outputs as well as a real 9 pin serial port and 25 pin parallel port, 2 USB ports and a good quality sound card with mic + Line in + headphone / audio out and good built in speakers. I also have the DVD reader / CD-CDR reader/burner and a plugin floppy drive! It has many scientific programs like MatLab and all of my older Xilinx ISE and so forth. I have a ton of ham radio programs for SSTV-CW-WEFAX and I can even plug it into the video projector at the Masonic Lodge and play video or step through .jpg images during ritual practice. It is stuck at XP-SP2, nothing newer and it never goes online but I can tell you it is the hardest working horse in my stable!! Cheers mates!!
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1323
  • Country: pl
Re: Question about DEV-C++
« Reply #4 on: November 16, 2023, 10:27:33 pm »
In 2005 in my college Dev-C++ was used as the default IDE for C++. I don’t recall any serious problems with it. I don’t think there were any drastic changes since then, so it should still be fine.

While personally I developed dislike for IDEs, a lightweight program in Dev-C++ style seems well suited for learning. Not overloaded with features, allows for quick write-test cycle, hides parts not important to the newcomer.
People imagine AI as T1000. What we got so far is glorified T9.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15172
  • Country: fr
Re: Question about DEV-C++
« Reply #5 on: November 16, 2023, 11:17:19 pm »
One question is, where did you get it from - which DEV-C++ are you talking about? The original DEV-C++ is "abandonware" as far as I can tell, the latest version is from 2016 and has been frozen every since. It still works, but just so you know.
The project has been forked since then by several teams, and the most recent (and probably most featureful) seems to be the one sponsored by Embarcadero: https://www.embarcadero.com/free-tools/dev-cpp

If you absolutely need an "IDE", it's fine. Just know that even this most recent version still has TDM-GCC 9.2.0 as its compiler, which is by now a relatively "old" GCC version. Again, not that it's a big problem.

Regarding Python, I don't know. Yes, GDB can come with some Python files, but not hundreds (at least that I remember of, I don't use Python with GDB)? Possibly they have added Python scripting to DEV-C++ in this fork. Probably not something you should care about at this point.
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 20350
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Question about DEV-C++
« Reply #6 on: November 17, 2023, 12:04:14 am »
Obligatory comic from Abstruse Goose regarding learning C++ in 21 days. ;)

This is full of wry humour, and grokking it will serve you well: https://yosefk.com/c++fqa/picture.html#fqa-6.1 Do follow the links; there's plenty more fun to be had there!
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 27671
  • Country: nl
    • NCT Developments
Re: Question about DEV-C++
« Reply #7 on: November 17, 2023, 01:05:40 am »
Oh the good old DEV-C++. This was all the rage when I was in university. I completely forgot about it.
It sure has it's warts though. I traded it in for Eclipse CDT somewhere around 2005 and never looked back. Nowadays VS Code is worth a look (although it is less complete compared to Eclipse CDT out of the box).
« Last Edit: November 17, 2023, 01:46:13 am by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6772
  • Country: fi
    • My home page and email address
Re: Question about DEV-C++
« Reply #8 on: November 17, 2023, 11:31:01 am »
For those interested in how one can use Python scriptlets for adding tools and utilities to GDB, I posted an example about a decade ago.

The tree approach can be useful, if you have a finite state machine or a menu system defined using data structures, as it shows how one can examine the data structures visually, even piping the description to an external program.  The tree example itself uses GraphViz to draw a graph of any binary tree using pointers, directly from GDB: you only need to name the pointer fields and the possible label field for each node.  (pretty() currently only implements strings, but you can easily add support for any other label field type.)

Such Python scriptlets can be identified by the import gdb near the beginning of the script.  (The .py files are plain text files you can open in any text editor, like WordPad in Windows.)

I suspect the Python files implement a graphical user interface instead.  Looking at the import lines near the beginning of the scripts would tell; PyQt, PySide, tkinter, gi (with from gi.repository import Gtk), and wx are the most common UI toolkits used I believe.  The tkinter (Tcl/Tk) one is standard in Python, too, and the rest only need some support libraries.
 
The following users thanked this post: DiTBho

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 7859
  • Country: nl
  • Current job: ATEX product design
Re: Question about DEV-C++
« Reply #9 on: November 17, 2023, 12:04:11 pm »
Oh the good old DEV-C++. This was all the rage when I was in university. I completely forgot about it.
It sure has it's warts though. I traded it in for Eclipse CDT somewhere around 2005 and never looked back. Nowadays VS Code is worth a look (although it is less complete compared to Eclipse CDT out of the box).
For sure it was a good choice. If you read this:
https://wiki.eclipse.org/CDT/Setting_Up_Eclipse_CDT

you will understand it why. The DEV-C++ installation is clicking on a exe file twice. Try explaining any other installation process to hundreds of EE students, half of them might have never even wrote a program before, and some of them still carrying Pentium M laptops. Plus Eclipse is Java, and every electronics engineer student knows that Java is evil. It's a perfectly capable IDE to write our bubble sorting algorithms, and chained pointer lists.
 
The following users thanked this post: JPortici


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf