Re: 1] UNIX/LINUX Compilation 2] IDE



Hi,

On Jan 29, 9:46 am, DJ Delorie <d...@xxxxxxxxxxx> wrote:
1] Is it possible to set  flags to compile C programs that will run
under Unix or Linux?

No.  While it is possible to build a djgpp-to-linux cross compiler,
it's very difficult (I've done it before) and just not practical.  Run
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.
.



Relevant Pages

  • Re: Use of C99 int types
    ... > those that actually are part of the C-implementation for Linux. ... the kernel definitions are part of /usr/include). ... The kernel uses __foobar stuff provided by the compiler because it has ... > the Gimp and GCC run on completely different architectures aswell. ...
    (Linux-Kernel)
  • Re: function pointers
    ... I am using gcc under ... gdb, and the compiler, exactly like in 1986 when I first started using ... when running on linux, I usually use gedit or kedit. ... There is only one debugger: ...
    (comp.lang.c)
  • Re: Use of C99 int types
    ... the compiler. ... > Except the kernel wants to be optimized and work and use what features ... And where exactly are linux and libc when compiling code for an ... Just to make the bloody point GCC is not dependent on Linux in any way ...
    (Linux-Kernel)
  • Re: Testing ham radio software on Sun hardware.
    ... Is that like the way Micro$oft adheres to the W3C standards? ... It sometimes means code built with gcc will not compile on better compilers. ... The other issue is that people often write code that works on Linux, but makes use of Linux specific header files. ... If anyone has some open-source UNIX or Linux code they would like to test on a Sun, using a commercially produced C compiler, let me know. ...
    (uk.radio.amateur)
  • Re: Wozu noch DOS?
    ... Linux jedoch zum Betriebssystem, aufgrund irgendeiner schwer faßbaren ... für welchen Compiler sie geschrieben sind, ... *Note Standard Libraries: Standard Libraries. ...
    (de.comp.os.msdos)

Loading