Results 1 to 6 of 6

Thread: Xcode SDL2 issue: "Undefined symbols for architecture i386"

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Finally some progress!

    I had to add:

    {$IFDEF DARWIN}
    {$linkframework Cocoa}
    {$linkframework SDL2}
    {$linkframework OpenGL}
    {$linkframework SDL2_image}
    {$linkframework SDL2_mixer}
    {$ENDIF}

    To the main source file to get it to compile. I have no idea why, though. It now crashes when setting up the OpenGL context during runtime, but at least it's compiling now!
    Laserbrain Studios - Currently developing Hidden Asset!
    Ascii Sector
    - Real-time roguelike in space!

  2. #2
    ev1313's headers use {$LINKLIB} to specify linking to SDL2. I'm guessing that because you put the SDL2 lib in Frameworks/, {$LINKLIB} failed to find them so you had to use {$LINKFRAMEWORK}.

  3. #3
    Ahhh, that makes sense! There should probably be a notice about that in a readme or somewhere else, since per the installation instructions on the SDL2 website, most people will probably install the frameworks in Library/Frameworks.

    I also fixed the OpenGL crashing issue (I had OpenGL was set to PROFILE_CORE when it should be PROFILE_COMPATIBITY as I'm using immediate mode). I've never been this relieved to just manage to compile and run some code before!
    Laserbrain Studios - Currently developing Hidden Asset!
    Ascii Sector
    - Real-time roguelike in space!

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
  •