Slashdot Mirror


GCC-based IDE's for DOS?

PM4RK5 asks: "Today in computer science 3, I was plugging away at compiling a string class in Borland C++ (version 3.x), and came across a glaring problem, in terms of compiler problems, not source problems, as I had successfully compiled the same source code earlier using GCC on Linux. Now we're looking at using DJGPP as it uses GCC/G++ and has a comparable IDE (RHIDE) to the Borland IDE, even though some features aren't available yet. However, before we use this on every computer, are there any better GCC-based IDE's and/or compilers for the DOS platform? Maybe any that support the Win32 GUI? (for those of us bold enough to try). I have to admit, I much prefer developing on a *NIX platform, but school computers are limited to Windows/DOS. Even if there aren't any better IDE's, it will still be nice to have a better compiler on hand with GCC and RHIDE. Any suggestions would be appreciated."

39 comments

  1. MSVC by Anonymous Coward · · Score: 0

    MS Visual Studio can run external tools, use 3rd party helpfiles for it's help system, etc.

  2. Visual Studio is really the way to go by Anonymous Coward · · Score: 0

    If you want to swap out the compiler, you can do that too.

  3. wait, i'm confused by Anonymous Coward · · Score: 3, Interesting

    Are you running windows or dos? Are you looking for zero or low cost (I'd guess yes if you're using a seven+ year old compiler)? Really, RHIDE is comparable to the borland interface, and gcc/g++ will knock the pants off of turboc 3.0's c++ code generation, simply becuase turboc 3.0 is ANCIENT. Actually, you can get a dos VIM as well as (part of djgpp) make and whatnot, so why even bother with an IDE? IDEs really do very little but coddle students. Or, get a dos ssh client and make people shell to a free unix host like linux or *bsd. If you're actually running Windows, putty is good (google for "putty ssh download"). If you're running windows AND your school has money, the Metrowerks compiler is pretty good for education (MSVC is just too goddamned quirky and complicated for me to recommend). I hope this doesn't come across as a flame, but if you are in the third section of a CS course and they have you all writing string classes (hello, STL?), win32 gui programming with c++ (which pretty much means the awful, horrible, abortion known as mfc) is waaaaaay harder than what you or they want to get into. There's a ton of interesting things you can do with c++ that don't involve GUIs. e.g. networking code, interacting with a database, console-graphics user interfaces, etc. heck, as a semester long project write a point of sale system using some old 386s as console-mode clients hooking to a central server that you write (networking code) that stores the transactions in something like berkelydb or mysql or something... Do it in teams, require documentation, have the teacher set milestones, etc. Have the whole class earn the same grade based on the functionality of the system. This will be the closest you ever get in school to what it's like to be a real world programmer.

    1. Re:wait, i'm confused by qurob · · Score: 1

      Really, RHIDE is comparable to the borland interface, and gcc/g++ will knock the pants off of turboc 3.0's c++ code generation, simply becuase turboc 3.0 is ANCIENT Not that Turbo C is a bad compiler, it's more of the fact that it is 16bit rather than 32...

    2. Re:wait, i'm confused by Anonymous Coward · · Score: 0

      Well, yeah, but there are a LOT of things that turboc 3.x doesn't handle that djgpp would simply becuase djgpp is a lot more recent (e.g. the STL classes, templates in general, etc. etc. not that any current compiler really handles that crap perfect to begin with). Also, with the dosextender thing, you get 32bitness basically for free (not that student code is likely to hit that barrier very much, but still). Not that I recall developing on DOS as being very fun ANYWAY, but I digress... ;^) really the only disadvantage that I can think of is that the djgpp tool suite's gas would have the "other" syntax than what most people in the dos world are used to. Of course there's always nasm...

    3. Re:wait, i'm confused by Mignon · · Score: 2
      This will be the closest you ever get in school to what it's like to be a real world programmer.

      Your suggestions are good, but I would say our questioner's experience dealing with differing compiler abilities is just like that of a real world programmer. What I work on requires a bit of fighting with the MS compiler, gcc, Sun Forte and Workshop to get them to agree on code.

      Also, just because STL implements string classes doesn't mean a student shouldn't try to do the same thing. But I'll skip the tedious teacher talk.

  4. Emacs by MadCamel · · Score: 2, Interesting

    EMACS has a DOS port, and there are packages for EMACS to turn it into a fairly decent GCC IDE. I have no DOS/Win machines, but perhaps you should give it a try.

  5. cygwin by Dr.+Sp0ng · · Score: 2

    Try Cygwin, which has a Win32 port of gcc. As for IDE's, I used RHIDE waaaaay back in the day with DJGPP, and it was decent, I suppose. But really, when you've got vim, what more do you need? :)

    1. Re:cygwin by SanLouBlues · · Score: 2

      Not to troll, but I will. Cygwin sucks ass for development. Everything is linked to cygwin.dll (which is GPLed, but that's a whole other can of worms) causing apps built in cygwin to run noticably slower than the same thing in mingw (On my 550mhz AMD). Plus I'm not sure, but I don't think cygwin runs in DOS w/o windows.

      This is not to say that cygwin sucks ass (I use it), but beyond providing a nicer Windows environment/command shell and XFree it has no use.

  6. cygwin is all you need by demian031 · · Score: 1

    fire up cygwin and you've got all you need; make, vim, g++? the cygwin project has become incredibly impressive. my windows boxes magically suck much less (if they would manage to stay up throughout the day).

  7. For Win32 by Anonymous Coward · · Score: 3, Informative

    Dev-C++ is a nice packaging of MingW with a workable IDE. It's not exactly the best IDE I've ever used (IMHO it's a little shabby compared to the later Borland IDEs), but it's good enough for beginning programmers to cut their teeth on before they move to a Real Editor like vim or Emacs. Plus it's Free (as in speech) and free (as in beer), which is nice for an educational environment.

    1. Re:For Win32 by Anonymous Coward · · Score: 0

      The thing about Dev-C++ though (unless it's changed since I last tried it) is that (1) paths have to be absolute, and (2), you can't have a source file with the same name as your project because it names the compiled resource file .o
      I'd recomend MingW32 with your Windows editor of choice (mine is EditPlus 2), but that sticks you with no good way of debugging :o(
      Given the choices of MingW32, Cygwin, and DJGPP though, I have to recomend MingW32, as I think it best supports Windows (GUI) stuff (this is based more off of things I've heard than personal experience though). (Though I do use DJGPP's collection of *nix tools for Windows, just not the compiler.)

    2. Re:For Win32 by jensend · · Score: 2, Informative

      Dev-C++ is currently undergoing 5.0 development, and will be a very good tool when it reaches that milestone. I don't know whether or not the 4.0 series is solid/"non-shabby" enough for a full class. DJGPP has always been the best option for DOS and continues to be a great option for windows, IMHO. When Dev-C++ 5 comes out, however, I think DJGPP will be surpassed.

    3. Re:For Win32 by man_ls · · Score: 2

      I'd have to say that Dev-C++ is the most utter piece of crap I've ever used. Broland 5.0 is FAR superior to it in my opinion, and it's a lowly 16-bit DOS tool.

      Dev-C++ absolutely refuses to allow me to use any library function from #include "conio.h" such as clrscr(); and getch(); at the end of my programs to pause results in function redefintion: getchar(); error messages. The same thing works perfectly in Broland...

      I think they need to get their act together and clean the program up before it'll be worth anything. The best compiler in the world is only as good as the IDE tied to it, if you're using that. If no IDE, it's as good as your command line skills.

    4. Re:For Win32 by Anonymous Coward · · Score: 0

      Try #including conio.h and stdio.h.

  8. Clarification... by PM4RK5 · · Score: 2


    OK, I apologize for any confusion, but we're using Borland 3.x (I don't know the 'x'). But yes it's ancient, and thats the problem we've run in to. But the problem is, I'm looking at deploying this in a high school environment, and we need the IDE for debugging our programs, as that is what all the students are used to already.

    I'm used to both the Borland IDE, and VIM/GCC/GDB in Linux, but nobody else in the class would be. We've all run in to quirks with the Borland compiler so that's why we want something new (copmiler-wise, and gcc is both free and extremely good, IMHO) with a familiar IDE, or one of comparable usage.

    I hope this clarifies some of the questions.

    So far it sounds like RHIDE is the way to go (with DJGPP), and those of us that want to can still use Makefiles to manage multiple-file projects. (I'd probably have to explain that to the class) Also, from my experience, we'd also be able to use RHIDE for both C++ and Pascal via gcc and Free Pascal. So this could provide an all-in-one solution for our Computer Science department.

    If I convince the teacher(s) to use it, it will be a score for OSS =)

    1. Re:Clarification... by Anonymous Coward · · Score: 0

      Al Stevens has been developing an IDE called Quincy for a few years and keeping readers of DDJ up to date with its development. It may be something worth looking into.

    2. Re:Clarification... by Anonymous Coward · · Score: 0

      Quincy builds on mingw or borland's 5.5 free compiler. there's a 2000 version out too btw.

    3. Re:Clarification... by RGRistroph · · Score: 2

      For what work I have to do on DOS, I like the "GNU Tools for MS-DOS and MS-Windows" publication by the Free Software Foundation. They recently came out with a second edition. I urge you to buy the book and CD from the FSF, but the .iso of the CD (which has the text of the book) is on gnutella and probably elsewhere too. Leave some copies of the book around, some of the kids might read it.

      The development environment should be emacs and Makefiles. Maybe vim instead of emacs. But for the type of projects you would do in a class, the build process won't be that complecated. If you make one Makefile that builds two .o's and links them together, people should be able to take that as a template and do all they need to do. Yes, there will be some time spent learning make and emacs instead of programming, but emacs/vim and make (and gcc) are available for almost any platform the students are likely to encounter, and you will be betraying them as a teacher if you don't teach them stuff they can use.

    4. Re:Clarification... by alyandon · · Score: 1

      For high school I would have to say that deploying DJGPP + RHIDE would be the least traumatic for your students.

      I can understand that others might feel that "coddling" students with an IDE is a bad thing... but honestly -- if the "average" high school kids of today taking compu-sci related classes are anything like they were when I was in high school... they aren't going to get very far on a cygwin/vim/gcc/gdb type solution as the learning curve is far too steep for the limited time you have to actually teach in your typical high school course.

      Your average student will end up spending more time asking questions along the lines of "How do I delete a block of text in VI?" as opposed to the more important questions centered around basic software development and debugging.

      Just my $0.02...

  9. D-flat. by Jason+Pollock · · Score: 2

    Wasn't Al Stevens (of Dr. Dobbs fame) working on just this? I don't remember right now, but I seem to remember it fitting the bill. Here's a reference link I found in google:

    http://ai.kaist.ac.kr/~ymkim/Program/c++.html

    Search for "d-flat Al.Stevens" and you'll find a bunch of stuff.

  10. http://www.geocities.com/SiliconValley/Vista/6552/ by qurob · · Score: 3, Informative

    Shamelessly cut+pasted

    Tools for programming and developing your project
    Programming enviroments

    Robert Höhne developed (with the colaboration of some friends ;-) a whole IDE (Integrated Development Enviroment) with the same look & feel of the Borland's IDE but more powerfull ;-). It's called RHIDE. I contributed to this project with the Help classes (aka InfView, to read the Info files) and the text editor (specially designed for writing C/C++). The last stable version is 1.4.9 and is available for Linux too!.

    A very used enviroment in the world of Linux is the GNU Emacs. Emacs is a very huge and powerfull editor that can be customized by the user. The program is splited in various ZIP files. Now v20.5 is available for DOS.

    For people that comes from UNIX there are a VI clon for DOS called VIM (http://www.primenet.com/~imbe/vim/ The link seems to be broken, if you can get it download the sources and compile it). The sources of the last beta version (5.0t that compiles with DJGPP) can be obtained here. A GUI Shell for windows is available too.

    SET's editor (SETEdit) v0.4.41 by ... SET, that's: by me ;-). SETEdit is a very powerful editor with a lot of tools for programmers (is the one used by RHIDE). That's the last version publicly available. If you want to cooperate just contact me. Free, donations accepted ;-). For information and downloads visit this page. Last beta version is v0.4.49 and is a candidate to become the next stable release. A test binary for Win32 (native Win32) is available. Debian packages and test versions for Linux/PPC and Linux/SPARC are also available. We need help to fully support Solaris and FreeBSD, also to fix problems in Linux/Alpha.

    Lemur 0.3 (alpha) by Endlisnis scanning program. It is a sLisp script for Setedit (and hence RHIDE) plus a program to look up function prototypes, structure members, etc.

    FTE is a portable editor compiled with djgpp under DOS, is available for Linux, X-Windows and OS/2 too.

    DFE 95 by Will Weisser is a native win32 IDE for Windows 95. Is available in Simtel too (/v2apps) but 3.4 is only in this link or try this. Free. Sources. The author abandoned the project but Exuviae announced a new GUI called DFE98 (was in http://home.sprintmail.com/~exuviae) or try here, I'm not sure if that's the continuation. Note: the version I downloaed in november 1997 wasn't very stable.

    colgcc by Richard Dawe colours the output of gcc to highlight warnings and errors. Useful for command line funs. Now v1.2 available. Sources. GPL.

    RSXIDE by Rainer Schnitker is a IDE for Win32 systems. It can be used for RSXNTDJ.


    Personally, I like RHIDE and DFE. Haven't done any DJGPP in forever!

    I can remember the days building Allegro on my Pentium 75!

    ------------

    Oh, here's a link for a billion Windows editors:

    CNET Download.com

  11. Quincy by Otter · · Score: 2, Informative

    His C++ book (which I recommend) came with a free gcc-oriented IDE called Quincy. I never tried it, not having Windows, but the screenshots look promising.

  12. BC 5.2 by soundman32 · · Score: 2, Informative

    Why not download the latest (free) Borland command line compiler, and use that (using makefiles if necessary). It's much more up to date than the 3.x one (obviously).

    --
    No sharp objects, I'm a programmer!
    1. Re:BC 5.2 by Artana+Niveus+Corvum · · Score: 1

      Unfortunately for BC++ 5.2, it sucks badly...very badly. It was released before the STL standards were fully finalized so they *guessed* at what they would be and it is really =80 percent compatible with real STL. 5.5 is somewhat better, but at that point you lose the functionality of the 5.2 gui. Borland C++ compilers (with the distinct exception of Builder 5!) are just a very bad idea. (I have had several classes in which I was required to write my programs in Borland 5.2 to "guarantee" compatability with the teacher's machine... problem is even on the constantly re-ghosted, as identical as humanly possible computers in my university's computer lab... one machine will compile your program totally differently (with random sets of errors) even as compared to the machine right next to it.) anyway, that's my rant.

      --
      -----------------------------------------
      Remove the Greed which plagues mankind.
    2. Re:BC 5.2 by Artana+Niveus+Corvum · · Score: 1

      the above that appears as an = was typed as a c less than or equal to statement, and the less than sign was apparently eaten somewhere in the middle. (html whatnot I imagine)

      --
      -----------------------------------------
      Remove the Greed which plagues mankind.
  13. Source Navigator by KarlH420 · · Score: 2, Informative

    Try Source Navigator. It works on windows, and UNIX's

  14. Open Watcom? by qurob · · Score: 1

    Not GCC, but....

    http://www.openwatcom.org/

  15. DJGPP by rasjani · · Score: 2
    How about just using the native "port" called djgpp

    Here's a quote from the djgpp faq

    The core of DJGPP is the MS-DOS port of the GNU C/C++ compiler, GCC, and auxiliary utilities, such as assembler, linker, librarian, Make, and a hypertext docs browser. The DJGPP C library was written specifically for DJGPP, mainly by DJ Delorie himself, with help from a small group of volunteers. This core set of utilities and libraries is still actively developed and maintained.
    --
    yush
    1. Re:DJGPP by Dr.+Sp0ng · · Score: 2

      How about just using the native "port" called djgpp

      Well, the story mentioned DJGPP, so I assumed he already knew about it :) Plus, he was asking about Win32 compilers. DJGPP is DOS-only.

  16. allegro by mattdm · · Score: 1

    Ok, this is off-topic a bit, but you might be interested to know, if you don't already, that Allegro is still alive and well, and reached version 4.0 just last month. Runs in DOS, Linux, FreeBSD, Irix, Solaris, Win32, and BeOS, with MacOS and QNX in the works.

    http://www.talula.demon.co.uk/allegro/

  17. Emacs + Cgywin GCC + Cygwin GDB by lkaos · · Score: 3, Informative

    Emacs offers syntax highlighting, integrated debugger support, keyboard macros, next error jumping, etc.

    Emacs the most powerful IDE out there. It integrates real nicely with GCC. The only down side is that there isn't a GUI oriented 'project' builder but that's what Make is for :)

    I mean, it's easier to make a Makefile containing:

    SRCS=File1.c File2.c
    OBJS=$(SRCS:.c=.o)

    all: ProjectName

    ProjectName: $(OBJS)
    $(CC) -o ProjectName $(OBJS)

    Than to putz around with all that silly wizard stuff. I'll never understand why programmers need GUIs to generate code to compile their code.

    I gather from your responses that this is for a school, and the simple fact of the matter is that most production environments (and consequently, most programming jobs) are Unix based so learning about Makefiles and how to use Emacs has to be incredible valuable (I know I wish that the new hirers we get would have been taught this stuff in school...).

    --
    int func(int a);
    func((b += 3, b));
    1. Re:Emacs + Cgywin GCC + Cygwin GDB by swimmar132 · · Score: 1

      You'll want to add

      CC=gcc

      at the top of that makefile for it to work.

  18. Free compiler list by Anonymous Coward · · Score: 0

    This is a little off topic, but somewhat related. A list of free compilers.

    http://www.thefreecountry.com/developercity/inde x. shtml

  19. My preference by skware · · Score: 1

    I have played a bit in the past with this issue, and come to the conclusion of mingw (Minimalist GNU for Windows) and the dos/windows version of VIM. With this approach you sidestep the issue of cygwin.dll being GPL rather than LGPL, and thus can release proprietry programs if you choose. The windows version of GVIM (Graphical VIM) has the ability to use the commons windows hotkeys and so on, as well as the normal vim shortcuts, so users comfortable with either should feel at home. Another advantage MinGW has is the size of generated executables, by default they are so much smaller than cygwin and MSVC executables.

  20. GCC under Win32 with Visual C++ IDE by abdulla · · Score: 1

    Can someone explain to me how I would go about setting up the former? I take it I'd need all the GCC tools, but would it allow me to create working Win32 programs?

  21. Another alternative by elcairo · · Score: 1

    There was a good article with similar question (but for Java). Well, the program EditPlus has an intersting system of "scripting" that permit you to create menu with custom command, like compile, run, debug; in a dialog panel or directly in a ms-dos prompt, with any type of compiler. And the color coding of keywords is very good (in c/c++).

    The negative aspect is that EditPlus isn't free.

  22. VIDE? by hfx_ben · · Score: 1

    I'm just wondering what folkz have tought of VIDE ... http://www.objectcentral.com/vide/ hfx_ben http://hfx_ben.blogspot.com/

    --
    -- When you look to see how the system works, you usually find that it doesn't.
  23. Re:http://www.geocities.com/SiliconValley/Vista/65 by tenordave · · Score: 1

    >I can remember the days building Allegro on my Pentium 75! I was there...and it doesn't seem that long ago now does it?

    --
    http://students.washington.edu/djwatson