• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
bad magic number (not a Mach-O file) - UPDATE
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bad magic number (not a Mach-O file) - UPDATE


  • Subject: bad magic number (not a Mach-O file) - UPDATE
  • From: Ben Dyer <email@hidden>
  • Date: Wed, 24 Mar 2004 16:34:21 +0000

Hi all..

OK..so I've figured a few things out since my last post..

I've made my CW (8.3) test library produce a .o file, then used :

libtool -static test.o -o libfoo.a to created a static library that XC would like.

When I use nm libfoo.a I can see the symbol in there (it's just a really
simple single test function in the library).

Also, otool -vt libfoo.a shows my symbol and the disassembly .

I added this library to a simple XC project and included the
header for the library, but when I try to call the
function from my library I get the following link error :

Undefined Symbol:
(MyTestFunc)

I can see in my XC build window that -lfoo is being executed but I don't understand
why I'm getting the link error.


If I remove the library from the XC project, I get the same result. It's as though the
linker can't find the symbol in the library. What have I missed? Is there something
else I need to do to publish the symbols from the library?


Any help would be very much appreciated :-)

Ben.
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: NSHangOnUncaughtException does not work ?
  • Next by Date: Fwd: NSHangOnUncaughtException does not work ?
  • Previous by thread: Fwd: NSHangOnUncaughtException does not work ?
  • Next by thread: shared cache folder in build?
  • Index(es):
    • Date
    • Thread