I wanted to get some good old Dos-action using Linux, specifically OpenSuse 11.0. Since Dosbox didn’t offer an RPM for my distro, I felt compelled to compile DosBox from the source, but, as always, compiling has its own share of problems. This will be a guide for people who already have the requisite basis on which to compile programs (C++ compiler + make) and know how to use a terminal. But I think this will also help more advanced users with some errors, which, if you don’t know a bit of C/C++, will cause some wonderment and probably disdain. In any case, before you download the source, you should install sdl-devel, it will be required by DosBox and was probably not installed using the normal installation settings of Suse, even with C++ dev packages installed.
Download the source, and extract it into any folder. Now open your terminal, change to the main directory of the dosbox source, and type in
You should not get any error messages yet. If you do, you probably need to install some missing libraries, just search for them using the Yast software-installation-module and install. After installing missing libraries don’t forget to run configure again, to see if everything is set!
After you ran configure and everything seems fine, type in
This is where the problems appear, at least for me on my system.
First of I got a “memset was not declared in this scope”-error message in gameblaster.cpp. To remedy this I simply included string.h to the header files of gameblaster.cpp, which is located in src/hardware. So simply add
to the top of the file using any program you like.
The result should look something like this:
Go back in the main DosBox directory, type in make again. After a while an error in tandysound.cpp, also in the src/hardware folder, appears, stating that this time strcmp was not defined in scope. I thought that the “str” prefix probably refers to string, so I simply added string.h to tandysound.cpp again, and you should do the same, of course! Problem solved.
Get back to the main directory and run make again. I got the last error message, saying that “atoi” was not in scope in shell_cmds.cpp, located in the src/shell directory. I didn’t really know what atoi was, but after some searching on the internets, i found out it was defined in cstdlib.
So I again appended it to the top of the file using:
Note that the name is cstdlib, not cstdlib.h. Afterwards I ran make again, and voila, the DosBox executable appeared in the src folder and the kingdom was saved.
Hope I helped someone, if not, well, then I’ve wasted my time! Hey, at least I admit it!