Mail Archives: djgpp/2009/01/29/18:00:50
Hi,
On Jan 29, 9:46=A0am, DJ Delorie <d DOT DOT DOT AT delorie DOT com> wrote:
> > 1] Is it possible to set =A0flags to compile C programs that will run
> > under Unix or Linux?
>
> No. =A0While it is possible to build a djgpp-to-linux cross compiler,
> it's very difficult (I've done it before) and just not practical. =A0Run
> a Linux-based distro; it's far easier.
OpenWatcom can cross-compile from DOS to any other target OS that it
supports (although I admit their Linux support is experimental and
doesn't always work ... but worth a try at least). Latest is 1.8 RC3,
which improves the C++ support a lot.
Of course you meant GCC. Yes, you can cross-compile to ELF, but I
guess DJ means the difficult part is linking, esp. shared libraries or
more complex stuff like that. Of course, the only ELF-based tools I
know of were Daniel Borca's DJGPP/ELF, the DJGPP-hosted MOSS "cross"-
compiler, and Josh Vanderhoof's Cross ELF linker. (Search for these or
e-mail me and I'll point you in the right direction.) That'll only get
you halfway, though, since none of those comes with GNU Libc (2.9 is
latest). You may have better luck asking on the GCC mailing list.
As far as Linux distros, DJ should've been more specific (or else
maybe you can tell us what you want?). The small BasicLinux distro
fits in 20 MB on top of a pre-existing FAT drive, and there are third-
party tiny GCC and TCC compiler add-ons for it. That might be a little
too minimal, but it's worth checking out, IMHO. Otherwise I'd suggest
ZipSlack (from Slackware 11, approx. 70 MB packed .ZIP), which is also
UMSDOS, or something similar like DeLi Linux (uses uclibc, I think),
which is bigger still. Then again, those might be too outdated (2.2.x,
2.4.x, ??) and use older libs (e.g. libc5 for BasicLinux but can be
upgraded to GLIBC 2).
> 2] What is the list's favorite IDE for pure DOS [DOS 7.1, the DOS
> that underlies Win98]. I have a non Windows DOS 7.1 box. Hopefully
> the IDE will have a GUI, will edit, compile and debug and not run as
> a command line system. I am presently using Rhide, and wondering if
> there is anything better.
I'm not sure about the "debug" part, though. AFAICT, RHIDE is the only
one with a true TUI debugger interface (although GDB 6.4 from /beta/
supports --tui but needs 686+) and last I heard only supported "-
gcoff" style. GNU Emacs can do anything you'll ever want (including a
GDB interface), but it's kinda unwieldy unless you're familiar with it
or really patient. VIM is in some (most?) ways as good as GNU Emacs
but not for everything. SETEDIT shares most of the same code as RHIDE,
but I'm not sure how much they overlap in total features (e.g. no
debugger included).
I personally don't really *need* a good IDE, just a good text editor,
so for me, things like TDE, VILE, JED, etc. are plenty good enough
unless you need special features (i.e. GNU Emacs is best for extreme
customizability).
In short, I'm gonna suggest you try JED and/or GNU Emacs (preferably
from CVS, see recent thread) or maybe VIM, since they support syntax
highlighting, menus, tags, read Texinfo or *nix Man files, key
emulation, UTF-8, goto error, multiple undo, scripting, word
completion, regex, etc. But RHIDE and GNU Emacs may be best for
debugging (although I admit to never trying that, honestly).
P.S. Almost forgot: RHIDE is deprecated, probably won't be updated in
the near future, and has issues on modern Windows (even XP). But if it
works for you, enjoy. Just a caveat.
- Raw text -