[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

Re: [XaraXtreme-dev] Xcode link problem (problem no more)

The penny finally dropped, regarding undefined zlib symbols...

The "zlib" code built into Camelot is not actually zlib but a re- hashed, object-oriented version that we created many years ago. So the undefined symbols really were, in fact, undefined symbols and the solution was to pull in a real zlib.

That solved, I now have a working LX built using Xcode (woohoo!) however, that is an i386 build (for speed of development) and when I turn on Universal Binary mode I find that libiconv is not itself a Universal Binary and so the link fails again (argh).

Some further twiddling will be needed...


On 24 Apr 2006, at 14:23, Ben Fowler wrote:

On 24/04/06, Phil Martin <phil@xxxxxxxx> wrote:
Ben Fowler wrote:
On 24/04/06, Phil Martin <phil@xxxxxxxx> wrote:

I've got a few remaining unresolved symbols in the Xcode build of XaraLX
which are related to libiconv and zlib:

[ snip ]

Thanks for the suggestions: I have fixed the libiconv problem by adding a reference to the "External frameworks and libraries" group as suggested.

Good to hear

Zlib is still a problem though: Zlib is compiled inside Camelot and so
the symbols really should be found during linking. __cplusplus is
defined and zlib.h detects that to wrap it's interface with extern "C" {}.

My next attack on this problem will be to try to find the difference
between those symbols and others in zlib that apparently do link up.

Curious. Mac OS X provides otool to examine symbol tables (you might find a
GUI for it called Timmy O'Tool) and there is also nm . The latter
should clear up
any question of name mangling. There is also a very good page somewhere under the general heading of migrating from BSD to Mac OS X which deals with
just these points.

Do the symbols needed for linking need to declared as extern as well
as extern "C"?