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 was almost sure that I already did try that, but I just did a clean + build and the errors did change, this time errors in the actual units (functions that need to be ported) and not linking errors.
    Well, time to work, I will ask again here in case I have more problems

  2. #2
    I'm back, after fixing all compilation errors in the units, now I've done a clean, and the linking problem is there again, saying that cannot find the initialization and finalizations of the included units in the generated pascallibrary.o
    What could be the problem?

  3. #3
    A broken linker? Try to inspect the object files manually and use -Sh to view the linker script
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

  4. #4
    I've disable dead code stripping and still the same result.
    I've added -Sh to the "other linker flags" but I don't much difference.
    However I tried to look at hedgewars xcode project settings, copied some stuff and now reduce from 24 linking errors to 10.
    How to inspect the object files manually?

  5. #5
    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

  6. #6
    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.

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

  8. #8
    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!

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
  •