VOGONS


First post, by eraH_retired

User metadata
Rank Retired
Rank
Retired

Yesterday, I managed to compile DOSBox using dynamic libraries. Today, I thought I would push my luck and try and compile DOSBox with static libraries.

I compiled the SDL libraries with

./configure --disable-shared -prefix=/mingw

I then compiled the CVS version of DOSBox, and it seems to work.

Next up was the SDL_net libraries, which I compiled the same way as the SDL libraries, but when I try and compile DOSBox, it says it can't find them.

configure: WARNING: Can't find libpng, screenshot support disabled checking SDL_net.h usability... yes checking SDL_net.h presen […]
Show full quote

configure: WARNING: Can't find libpng, screenshot support disabled
checking SDL_net.h usability... yes
checking SDL_net.h presence... yes
checking for SDL_net.h... yes
checking for SDLNet_Init in -lSDL_net... no
configure: WARNING: Can't find SDL_net, internal modem and ipx disabled
checking for main in -lX11... no

Any ideas what I've done wrong?

Reply 2 of 3, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

you probably need some more makefile magic after you've run configure. At least for OS X (which is very restrictive about static linking) I need to edit the makefile and in the LIBS= section need to replace for example -lSDL_net with the path to the .a file (in my case /opt/exult.i386/lib/libSDL_net.a).
AND in the beginning of that (LIBS=) I need to replace the output of "sdl-config --libs" with what "sdl-config --static-libs" gives.

So instead of (very OS X centric)

 LIBS = -lSDL_sound  -L/opt/exult.i386/lib -lSDLmain -lSDL -Wl,-framework,Cocoa -lpng -lz -lSDL_net -framework OpenGL -framework CoreMIDI -framework AudioUnit -framework AudioToolbox

I have

LIBS = -L/opt/exult.i386/lib /opt/exult.i386/lib/libSDLmain.a /opt/exult.i386/lib/libSDL.a -Wl,-framework,OpenGL -Wl,-framework,Cocoa -Wl,-framework,ApplicationServices -Wl,-framework,Carbon -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,IOKit -framework CoreMIDI /opt/exult.i386/lib/libpng.a /opt/exult.i386/lib/libz.a /opt/exult.i386/lib/libSDL_net.a /opt/exult.i386/lib/libSDL_sound.a /opt/exult.i386/lib/libogg.a /opt/exult.i386/lib/libvorbis.a /opt/exult.i386/lib/libvorbisfile.a /opt/exult.i386/lib/libvorbisenc.a

Again, this is all for OS X, you might want to look up what to do for mingw.

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 3 of 3, by eraH_retired

User metadata
Rank Retired
Rank
Retired

Just wanted to say a quick thanks, I saw there was a Makefile in the src folder which I edited it like you suggested, but this caused the compile to fail, I'll just keep trying and hopefully get somewhere.