Ok, now I get what you are saying...
I will try that and report shortly...
Thanks
Ok, now I get what you are saying...
I will try that and report shortly...
Thanks
so here is the command line (I renamed my SDLmain.o out of the way for this test):
and the result is:Code:/usr/local/bin/fpc -XMSDL_main -k-L/sw/lib -k-lSDL -k-lSDL_image -k-lSDL_Mixer -k-framework -kOpenGL -k-framework -kCocoa -Fu/users/billy1380/Documents/XCodeProjects/CBC/Jedi-SDLv1.0/SDL/pas -Fu/users/billy1380/Documents/XCodeProjects/CBC/Jedi-SDLv1.0/SDL_Image/pas -Fu/users/billy1380/Documents/XCodeProjects/CBC/Jedi-SDLv1.0/SDL_Mixer/pas -Fu/users/billy1380/Documents/XCodeProjects/CBC/CBCFoundation -Fu/users/billy1380/Documents/XCodeProjects/CBC/Jedi-SDLv1.0/sfont/pas -Fi/users/billy1380/Documents/XCodeProjects/CBC/Jedi-SDLv1.0/SDL/pas -Fi/swab/include/SDL SDLGuns.pas -Fl/sw/lib -Fl/usr/X11R6/lib
sorry about all the extra long paths...Code:Copyright (c) 1993-2006 by Florian Klaempfl Target OS: Darwin for PowerPC Compiling SDLGuns.pas Assembling sdlguns SDLGuns.pas(52,1) Warning: Object SDLmain.o not found, Linking may fail ! Linking SDLGuns /usr/bin/ld: can't open: SDLmain.o (No such file or directory, errno = 2) SDLGuns.pas(52,1) Error: Error while linking Error: /usr/local/bin/ppcppc returned an error exitcode (normal if you did not specify a source file to be compiled)
Damn!! Maybe the MacOS X 2.0.4 compiler doesn't have the SDL_Main fix.
OK last suggestion, find system.pp, inside that file find main(...) and rename it to SDL_Main. Then you would need to recompile the RTL and I'm not sure how to do that. If you manage to compile the RTL, you can then try the command line compile again but this time don't use the -XMSDL_main switch as it should not be needed now.
If I find an explanation of how to recompile the RTL I'll post it here.
I found this...
http://community.freepascal.org:1000...forum_id=24084
which states something like ( paraphrased )..
Not sure if it is accurate.After installing mingW 3.1, try to compile it so:
make rtl DEBUG=1
make compiler DEBUG=1
make ide DEBUG=1
make -C fv DEBUG=1
make installer DEBUG=1
Congratulations guys!
So Billy, can you pass on any information about how you finally got everything working on MacOS X? I will happily update the FreePascal wiki with any information you provide, so that others don't have to go through the same night mare.
Hi Guys,
Can you post exactly what command line you used on MacOS X to get everything to compile. I am using
[pascal]
/usr/local/bin/fpc -XMSDL_main -k-L/Library/Frameworks -k-lSDL -k-framework -kOpenGL -k-framework -kCocoa SDLDemo.pas
[/pascal]
but keep getting
I'm using FPC 2.1.1. any ideas?/usr/bin/ld: can't locate file for: -lSDL
There is nothing wrong with your command line... I will post the entire thing when I get home!
For the time being I think that the problem is that you do not actually have the SDL framework... to get that just go to libSDL.org and get the latest version... you will find that it is a dmg... copy the contents (SDL.framework folder) into your /library/frameworks directory...
try again...
The SDL.framework is definately there ( in the location you mentioned ) along with SDL_image etc. From chatting to Jonas ( the MacOS X maintainer ), I need to link to libSDLMain.a to get things going. Just to make things interesting I am also trying to get it working with XCode 2.4.
so here is the command line unedited:
notice the use of -k-L/sw/lib, this is where libSDL.dylib is located!Code:/usr/local/bin/fpc -Or -XMSDL_main -k-L/sw/lib -k-lSDL -k-lSDL_image -k-lSDL_Mixer -k-framework -kOpenGL -k-framework -kCocoa -Fu/users/~/Documents/XCodeProjects/CBC/Jedi-SDLv1.0/SDL/pas -Fu/users/~/Documents/XCodeProjects/CBC/Jedi-SDLv1.0/SDL_Image/pas -Fu/users/~/Documents/XCodeProjects/CBC/Jedi-SDLv1.0/SDL_Mixer/pas -Fu/users/~/Documents/XCodeProjects/CBC/CBCFoundation -Fu/users/~/Documents/XCodeProjects/CBC/Jedi-SDLv1.0/sfont/pas -Fi/users/~/Documents/XCodeProjects/Jedi-SDLv1.0/SDL/pas -Fi/sw/include/SDL SDLGuns.pas -Fl/sw/lib -Fl/usr/X11R6/lib
Bookmarks