First post, by Farnsworth
Is there any guide for this ? except this one, http://www.dosbox.com/wiki/BuildingDOSBox
it sais nothing about universal binaries or a static SDL.
Thanks
Is there any guide for this ? except this one, http://www.dosbox.com/wiki/BuildingDOSBox
it sais nothing about universal binaries or a static SDL.
Thanks
You somehow need to tell the compiler to produce a static library when compiling SDL.
1+1=10
The readme said :
On OS X, you can
achieve that by linkinag against the libraries listed by
sdl-config --static-libs
instead of those listed by
sdl-config --libs
Depending on how exactly SDL is integrated into your build systems, the
way to achieve that varies, so I won't describe it here in detail
look up the last line of the compile process
something like this
g++ -g -O2 -o dosbox dosbox.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 -lSDL_sound -lasound -lm -ldl -lpthread -L/usr/lib -lSDL -lpng -lz -lSDL_net -lGL
repeat that line manually and try replacing the SDL parts with their static counterparts.
It takes some skill and patience to find every piece you need
Water flows down the stream
How to ask questions the smart way!
When I build SDL,
First I type ./configure, after that "make" and the end looks like this
gcc -g -O2 -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -maltivec -force_cpusubtype_ALL -fpascal-strings -c ./src/main/macosx/SDLMain.m -o build/SDLMain.o
ar cru build/libSDLmain.a build/SDLMain.o
ranlib build/libSDLmain.a
it's about the dosbox build process.
Water flows down the stream
How to ask questions the smart way!
Oops,
The end of compiling looks like
g++ -g -O2 -o dosbox dosbox.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 -lm -L/usr/local/lib -lSDLmain -lSDL -Wl,-framework,Cocoa -lpcap -lSDL_net -framework OpenGL -framework CoreMidi -framework AudioUnit -framework AudioToolbox
So what I did,
I compiled SDL (as universal binary) <succesfully>
then I built DOSBox (again as universal binary)
I replace the ./configure with this :
env CFLAGS="-0 -g -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch i386 -arch ppc" \ LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=$dosbox --disable-dependency-tracking
(the site from Apple said that's the way of building uninversal binaries)
after make, I got a dosbox executable, to test if it was UB, Apple said :
file ./src/dosbox
It told me it's only PPC 😖
But then,
This man/woman was trying to build DOSBox 0.65 for intel (later UB)
To build a static SDL he/she said :
http://www.spam-filter.de/dosbox/dosbox_0.65_for_intel_macs
g++ -g -O2 -o dosbox dosbox.o cpu/libcpu.a debug/libdebug.a dos/libdos.a \ fpu/libfpu.a hardware/libhardware.a gui/libgui.a ints […]
g++ -g -O2 -o dosbox dosbox.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 \
/opt/local/lib/libSDL_mixer.a \
/opt/local/lib/libSDL_sound.a \
(...)
-framework OpenGL \
-framework QuickTime \
(...)
-lm
(I've left out some stuff to make this post less long)
So what I did, copied the g++ -g -02 thing from my build of DOSBox
and then changed "/opt/local/lib" with "/usr/local/bin/lib" because "/opt/" didn't exist here. And I didn't install SDL_Sound etc so I left "/usr/local/lib/SDL_sound.a \" out (I only found libSDL_net.a, libSDL.a and libSDLmain.a)
after that it gave me this
ld: in dosbox.o, file too small
collect2: ld returned 1 exit status
and the executable was dissapeared from the src folder.
Can somebody help me or can somebody tell me what to change Makefile so it makes a UB with a static SDL ?
Maybe "Shawn, Johannes and Marcus for creating the MAC OS X version." from the official DOSBox thanks file ?
Thanks
Isn't there anyone who can help me? please ??
Thanks
Please stop bumping threads.
Sorry, didn't mean to do that 😐
I'll stop asking stuff about DOSBox. But I was just learning...
Sorry for all the trouble...
I'll stop asking stuff about DOSBox.
Oh feel free to continue asking, just if nobody responds it doesn't mean
nobody likes you or whatever, just that at the moment nobody knows an
answer or doesn't have the time to check it out. Repeatedly posting about
it isn't helpful in that case.
Oh feel free to continue asking, just if nobody responds it doesn't mean nobody likes you or whatever, just that at the moment […]
Oh feel free to continue asking, just if nobody responds it doesn't mean
nobody likes you or whatever, just that at the moment nobody knows an
answer or doesn't have the time to check it out. Repeatedly posting about
it isn't helpful in that case.
Oops, I actualy didn't knew what "bumping threads" meant...
But thanks for learning me...
I'll stop pushing people to answer...