VOGONS


First post, by butterfly

User metadata
Rank Member
Rank
Member

I'm no programmer.
A few years ago I started noticing there's a lot of free original games over the Net released with their cross-platform source code.
I never wanted to mess with that stuff cos I thought compiling source was something above my possibilities. :giggles:
When I started using Ubuntu I had to compile a couple of things and it looked so easy (cos the system guided me to make useful things at hand)!
So I said "Cool! I could compile a few 'new' games and play them with my floppies only i486SX"
Now I downloaded DJGPP (djdev203 looks to be the most up-to-date version to compile DOS stuff) cos Google made it look the best choice to compile cross-platform source of free (GPL and other licenses) games. Being a total newbie at it I followed the Zip Picker instructions.
I stumbled upon allegro.cc web site so I also picked the Allegro libraries included in the package (an alternate method I used was to download the Allegro libraries - 4.3.2 seeming to be the latest DOS-capable version) but the docs refer to some fixdos-something.bat to link to DJGPP that is not there when I use the Zip Picker version.
I unzipped everything in a directory and everything was looking set, well appearently at least. 😅
I downloaded a few sources, some had a makefile, some didn't.
I fired DOSBox and started compiling but when i launched the make thing it started displaying a lot of errors, most of which looked to be missing libraries things.

To prove myself I ain't totally dumb I went to the MAME page, followed the instructions and I could compile the latest version for a 32bit Win machine.

What am I missing to compile DOS-ready sources with Allegro?
Where can I find a for-totally-dummies guide to achieve that?
Is DOSBox a reliable environment to compile DOS sources or would you suggest a different emulator/environment?

Reply 1 of 7, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Is DOSBox a reliable environment to compile DOS sources or would you suggest a different emulator/environment?

Hmm, in the past when that came up or when the question was about math programs that needed to be trustworthy, I got the impression that you shouldn't use Dosbox. Some needed stuff might be missing or so. But I could be wrong and the last time that came up was really some time ago.
I'm not sure if any emulator should be used. Maybe bochs.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 2 of 7, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

If you've ever looked at the sources of some emulator/virtual machine,
you'll never trust it for anything (that includes commercial solutions imo).
But of course a real system isn't fail-proof, bad ram may have the most
subtle effects.

To compile or play a *game* you can use anything that works, the errors
you describe are most likely missing headers/libraries.

Reply 3 of 7, by Harekiet

User metadata
Rank DOSBox Author
Rank
DOSBox Author

You could probably make a djgpp cross compiler and compile on windows/linux and run the created executables in dosbox. The open watcom compiler can also produce dos binaries without actually being run under dos i think.

Reply 4 of 7, by general_vagueness

User metadata
Rank Member
Rank
Member

Congratulations and welcome to the world of programming, or at least the section of sidewalk in front of the house where programming lives. If you're going to be compiling BASIC, I recommend FreeBASIC, it works well, has a nice front-end, and can compile DOS executables without being in DOS, as well as some other systems, and even the Xbox if you have or get one and decide to install Linux on it. If it's C, I'd probably say GCC, but I'm not nearly an expert on that. If it's Pascal, the above mentioned OpenWatcom seems to be a good choice, but I'm even less sure about that (edit: and apparently wrong). Good luck.

Last edited by general_vagueness on 2010-02-07, 17:37. Edited 1 time in total.

You cannot fall off the floor.
If you look hard enough, you'll find something you don't like.

How to ask questions the smart way
How to become a hacker
How to answer smart-alec questions

Reply 5 of 7, by butterfly

User metadata
Rank Member
Rank
Member

Thanks for the advice! Things are getting better. I wiped the whole DJPP directory and re-did it from start.
I guess I'm picking the wrong examples to compile for a newbie (let's say a few thingies with lot of dependencies) and I'm getting lots of "deprecated" errors. I'm also making some confusion about different languages but I guess something.c should be compiled with the gcc thingie and something.cc with gpp, correct?
Also most difficult thing for me is matching the different versions of DJGPP, Allegro and DUMB so I decided to get the latest versions of each but when I compiled the DUMB libraries with make it said "Nothing to be done for Allegro..."

Reply 6 of 7, by Kippesoep

User metadata
Rank Oldbie
Rank
Oldbie

Deprecation is a warning, not an error. It means that a piece of an API is outdated and may, at some point in the future, be removed entirely. While it's something that should probably be cleaned up, it will not cause compilation to fail.

Just a quick note: OpenWatcom is not a Pascal compiler. There is C/C++ and also Fortran.

My site: Ramblings on mostly tech stuff.

Reply 7 of 7, by leileilol

User metadata
Rank l33t++
Rank
l33t++

i'd stay far, far away from DOSBox or Windows NT when compiling with DJGPP (even when the zip picker has appropriate options for those you'll most likely run into segfaults). I personally find the fastest / most stable way for that is Virtual PC + Windows 98SE.

apsosig.png
long live PCem