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
    Have you tried rebuilding everything?
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

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

  3. #3
    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?

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

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

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

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

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

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
  •