Results 1 to 10 of 37

Thread: Linking Issues on MacOS X 10.6.5

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    ... because I accidently removed all the contents of my /usr/local folder, I had to reinstall fpc, lazarus and SDL. Because the framework version did not work anymore when I tried to use the compiler call above (it did not find the SDL library although libSDLmain.a was again in /usr/local/lib), I removed the SDL framework and instead installed the source version of SDL. ./configure, make, make install worked without problems and now all SDL libs are in /usr/local/lib again. Only for SDL image, I still use the framework version.

    I changed the compiler call to

    fpc -Mobjfpc -ve -k-lSDL -k-lSDLmain -k-framework -kSDL_image -k-framework -kCocoa -Fl/usr/X11/lib fprl.pp


    This gives me the following output:

    Linking fprl
    ld: warning: in /usr/local/lib//libSDL.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
    ld: warning: in /usr/local/lib//libSDLmain.a, file was built for unsupported file format which is not the architecture being linked (i386)
    ld: warning: in /usr/local/lib//libSDL-1.2.0.dylib, 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)
    "_SDL_SaveBMP_RW", referenced from:
    _SDL_SDL_SAVEBMP$PSDL_SURFACE$PCHAR$$LONGINT in sdl.o
    "_SDL_SetVideoMode", referenced from:
    _P$FPRL_SETOPTIONS in fprl.o

    and so on.

    Esp. the first three lines are disturbing me.

    What can I do now? I was so happy that everything worked, but obviously I did not understand how I got SDL to work on my system, so I can't explain the process to end users of the game as well.

    Please please help ... (I read all the topics related to SDL on MacOS in this forum, I also read the section on freepascal.org).


    Edit: Just in case it is a problem with PowerPC vs. i386, I tried to use the option to build a universal binary, as stated in the MacOS X readme in the SDL source folder. There it says I could call a script named fatbuild.sh. Well, I tried, but this script seems to have errors, or not to work anymore on Leopard.
    Last edited by Mario Donick; 06-01-2011 at 12:31 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •