@Stoney, thank you! This looks like a great solution, I'll try this now and report back soon.
Edit:
I added the IFDEFs at the beginning of my main file. Here the results:
1. When I use the single compiler call you gave me above, with the JEDI SDL headers (not the ones included in FPC), the game compiles and links, but crashes as soon as it tries to call SDL_INIT.
2. When I use your build script, it tells me:
Code:
Linking fprl
ld: warning: in ./libSDLmain.a, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols:
"_main", referenced from:
__start in crt1.o
(maybe you meant: _SDL_main)
So nothing has changed.
The libSDLmain file was created by me some days ago using the "devel-lite" folder in the SDL for Mac download, and using the following compiler call (as stated in the FreePascal wiki):
Code:
gcc -c -o SDLMain.o SDLMain.m -I /Library/Frameworks/SDL.framework/Headers
ar r libSDLMain.a SDLMain.o
ranlib libSDLMain.a
But somehow the resulting library seems not to be correct.
Bookmarks