Results 1 to 10 of 15

Thread: Linking issues with XCode + FPC for iPhone

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    I'm trying to figure this linking process.
    Well, we have the pascallibrary.pas that is the main file and has all the other units in the uses clauses (TERRA_Utils, TERRA_Application, etc)

    Now, it I understood correctly, the objective is to build a library called libfpc.a, that will contain all the stuff.
    The linker is trying to look at pascallibrary.o for those missing symbols (_FINALIZES_TERRA_UTILS, etc)
    But I suppose those are actually in their respective .o files, like TERRA_Utils.o?
    If is that, then I need to add them to the step where the library is assembled from the various .o files I guess, I'm kind of a noob at this kind of things

  2. #2
    Ok, I finally found the problem, I needed to add all source files for the units in the uses clause to the XCode project.
    Only 5 linker errors remaining.
    The only problem now, is two of the needed files appear greyed out in the Add Files dialog and I don't have an idea why :s

    EDIT: Fixed, I dropped the files directly from Finder, it seems to be a bug in XCode or something..
    Last edited by Relfos; 03-03-2011 at 04:18 PM.

  3. #3
    Many of your problems sound familiar. Are you using OpenGLES? If so, how? Any ObjC code in your project?

  4. #4
    Quote Originally Posted by Ingemar View Post
    Many of your problems sound familiar. Are you using OpenGLES? If so, how? Any ObjC code in your project?
    Yes, using OpenGL ES and some bits of objC, however the problem is already fixed, thanks!

  5. #5
    Quote Originally Posted by Relfos View Post
    Yes, using OpenGL ES and some bits of objC, however the problem is already fixed, thanks!
    That's good, I just wanted to see if you had any all-FPC solution. I have written an all-FPC OpenGLES test program, which misbehaves for no reason I can find. It works in the iPad simulator, but not for iPhone. That could, of course, be the topic of a new thread, but this was close enough to ask IMHO.

  6. #6
    Ah, I see. I still don't know how to make everything using only fpc though.

  7. #7
    Using FPC only can be achieved by using SDL 1.3 (Pascal headers are here: https://github.com/Stoney-FD/sdl13-pascal), worked so far for FPC 2.4.2 and FPC 2.5.1 for me, to be honest it's still a bit quirky at the moment, as the SDL 1.3 documentation is pretty much non-existant and much of the API changed since I did my tutorial on SDL 1.3 and iOS last year.
    Freeze Development | Elysion Game Framework | Twitter: @Stoney_FD
    Check out my new book: Irrlicht 1.7.1 Realtime 3D Engine Beginner's Guide (It's C++ flavored though)

    Programmer: A device for converting coffein into software.

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
  •