VOGONS


Yet another win32 DOSBox SVN compiling thread

Topic actions

First post, by marooned_on_mars

User metadata
Rank Member
Rank
Member

I tried recently compiling DOSBox by myself but am unable to as my attempt ends up in MinGW complaining for missing SDL. The DOSBox wiki article isn't very explicit for beginners (like me) so I'm not sure what am I supposed to do. I opted not to complicate myself and skip compiling SDL myself too. Here's what MinGW reports:

$ ./configure
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ranlib... ranlib
checking for sdl-config... no
checking for SDL - version >= 1.2.0... no
*** The sdl-config script installed by SDL could not be found
*** If SDL was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the SDL_CONFIG environment variable to the
*** full path to sdl-config.
configure: error: *** SDL version 1.2.0 not found!

Any suggestions?
Also, how could I add patches to DOSBox? That's also missing from the wiki and INSTALL.
Keep in mind that I never (successfully) compiled anything so sorry for my illiteracy. ^^
Thank you in advance~

Reply 1 of 70, by marooned_on_mars

User metadata
Rank Member
Rank
Member

Anyone? X.X

Reply 3 of 70, by marooned_on_mars

User metadata
Rank Member
Rank
Member

And how exactly would I specify the path in Mingw?

Reply 4 of 70, by VileR

User metadata
Rank l33t
Rank
l33t

I'm pretty sure it's necessary to compile SDL (and SDL_net if you need that too). The wiki article needs an update anyway...

Let's say you extracted "SDL-1.2.15.tar.gz" and "SDL_net-1.2.8.tar.gz" into their own directories under your user folder in mingw:

- Navigate to ~/SDL-1.2.15 and compile SDL:
./configure
make
make install

- Navigate to ~/SDL_net-1.2.8 and compile SDL_net:
./configure
make
make install

- Add the libraries to your PATH variable:
PATH=$PATH:~/SDL-1.2.15
PATH=$PATH:~/SDL_net-1.2.8

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 5 of 70, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

You don't need to compile SDL you just need to place the mingw package correctly. Wiki article is writing something wrong in regard to this.

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 6 of 70, by marooned_on_mars

User metadata
Rank Member
Rank
Member
Dominus wrote:

You don't need to compile SDL you just need to place the mingw package correctly. Wiki article is writing something wrong in regard to this.

I've tried following this guide in that regard, but it still complains it cannot find SDL.
How would I "place" the SDL package? (again, sorry for my illiteracy)

Reply 7 of 70, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

You should uncompress SDL-devel into your home directory inside msys, run msys and type 'make native' to install it.

http://www.si-gamer.net/gulikoza

Reply 8 of 70, by marooned_on_mars

User metadata
Rank Member
Rank
Member
gulikoza wrote:

You should uncompress SDL-devel into your home directory inside msys, run msys and type 'make native' to install it.

That fixed the problem, thanks. Now I tried to add the MUNT patch to DosBox (with the help of the guide provided by bloodbat), and it complains about missing files...

midi.cpp:106:23: fatal error: midi_mt32.h: No such file or directory
compilation terminated.
make[3]: *** [midi.o] Error 1
make[3]: Leaving directory `/d/Downloads/dosbox/src/gui'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/d/Downloads/dosbox/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/d/Downloads/dosbox'
make: *** [all] Error 2

I have no idea where to get that file since it didn't come with the .diff file.

Reply 9 of 70, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The .diff file is only the changes to the DOSBox source, you also need the libs and headers for the munt emulator where the compile environment can find them.

Reply 10 of 70, by marooned_on_mars

User metadata
Rank Member
Rank
Member

Got the MUNT sourcefiles but not sure where should I put them so that Mingw can find them...

Reply 12 of 70, by marooned_on_mars

User metadata
Rank Member
Rank
Member

Compiling with cmake gives me this:

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)


CMake Error: your CXX compiler: "bcc32" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
Configuring incomplete, errors occurred!

Reply 14 of 70, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

and when you have this sorted out, make sure you only cmake the lib and nothing else, because the other stuff wants glib2 (and that brings a whole other hell to compiling life 😀)

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 15 of 70, by marooned_on_mars

User metadata
Rank Member
Rank
Member
bloodbat wrote:

You need to configure cmake to point to your correct compiler (GCC) it defaults to Borland...
Read here:
http://www.cmake.org/Wiki/CMake_FAQ#How_do_I_ … ent_compiler.3F

Would that correct compiler be under Mingw? I'm not sure where I'm supposed to find it. Also have no idea what that generator would stand for ^^;

Reply 16 of 70, by bloodbat

User metadata
Rank Oldbie
Rank
Oldbie

If using their automated installer with default paths or following one of their guides it lives in c:\mingw\bin\g++.exe (why you are trying to compile something without knowing at least where your compiler is...is beyond me).
As for the generator you probably want CMakeLists.txt and to read this http://www.cmake.org/cmake/help/cmake_tutorial.html

Reply 17 of 70, by marooned_on_mars

User metadata
Rank Member
Rank
Member

Okay, somehow I got it work, got the makefile and I tried to make it in MinGW, yet it crashes when I do so.

Reply 18 of 70, by marooned_on_mars

User metadata
Rank Member
Rank
Member

Sorry for the double post, copied the MUNT files in dosbox/src/gui/ (where it was looking for "midi_mt32.h" ) and it seemed to work, up to this point:

make[3]: Entering directory `/d/Downloads/dosbox/src'
g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I/usr/include/SDL -D_GNU_SOURCE=1 -D
main=SDL_main -g -O2 -MT dosbox.o -MD -MP -MF .deps/dosbox.Tpo -c -o dosbox.o
dosbox.cpp
mv -f .deps/dosbox.Tpo .deps/dosbox.Po
windres -o winres.o winres.rc
g++ -g -O2 -o dosbox.exe dosbox.o winres.o cpu/libcpu.a debug/libdebug.a dos
/libdos.a fpu/libfpu.a hardware/libhardware.a gui/libgui.a ints/libints.a misc/
libmisc.a shell/libshell.a hardware/serialport/libserial.a libs/gui_tk/libgui_tk
.a -L/usr/lib -lmingw32 -lSDLmain -lSDL -mwindows -lopengl32 -lwinmm -lmt32emu
c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe: cannot fin
d -lmt32emu
collect2.exe: error: ld returned 1 exit status
make[3]: *** [dosbox.exe] Error 1
make[3]: Leaving directory `/d/Downloads/dosbox/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/d/Downloads/dosbox/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/d/Downloads/dosbox'
make: *** [all] Error 2