Question about DEV-C++ - Page 1
Forum section: electronics / general

author: CaptDon
author_rank: Super Contributor
timestamp: November 16, 2023, 02:51:15 pm
content: 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.

author: golden_labels
author_rank: Super Contributor
timestamp: November 16, 2023, 03:33:57 pm
content: The files likely come withgdb. 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.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 regardinglearning C++ in 21 days.

author: tszaboo
author_rank: Super Contributor
timestamp: November 16, 2023, 04:16:43 pm
content: Oh the good old DEV-C++. This was all the rage when I was in university. I completely forgot about it.

author: CaptDon
author_rank: Super Contributor
timestamp: November 16, 2023, 09:53:56 pm
content: 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!!

author: golden_labels
author_rank: Super Contributor
timestamp: November 16, 2023, 10:27:33 pm
content: 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.WhilepersonallyI 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.

author: SiliconWizard
author_rank: Super Contributor
timestamp: November 16, 2023, 11:17:19 pm
content: 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-cppIf 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.

author: tggzzz
author_rank: Super Contributor
timestamp: November 17, 2023, 12:04:14 am
content: Quote from: golden_labels on November 16, 2023, 03:33:57 pmThis is full of wry humour, and grokking it will serve you well:https://yosefk.com/c++fqa/picture.html#fqa-6.1Do follow the links; there's plenty more fun to be had there!

author: nctnico
author_rank: Super Contributor
timestamp: November 17, 2023, 01:05:40 am
content: Quote from: tszaboo on November 16, 2023, 04:16:43 pmIt 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).

author: Nominal Animal
author_rank: Super Contributor
timestamp: November 17, 2023, 11:31:01 am
content: For those interested in how one can use Python scriptlets for adding tools and utilities to GDB, I postedan example about a decade ago.Thetreeapproach 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. Thetreeexample 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 theimport gdbnear the beginning of the script. (The.pyfiles 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 theimportlines near the beginning of the scripts would tell;PyQt,PySide,tkinter,gi(withfrom gi.repository import Gtk), andwxare the most common UI toolkits used I believe. Thetkinter(Tcl/Tk) one is standard in Python, too, and the rest only need some support libraries.

author: tszaboo
author_rank: Super Contributor
timestamp: November 17, 2023, 12:04:11 pm
content: Quote from: nctnico on November 17, 2023, 01:05:40 amFor sure it was a good choice. If you read this:https://wiki.eclipse.org/CDT/Setting_Up_Eclipse_CDTyou 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.