[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[OT] OS X shared libs

From: mal content <artifact.one_at_googlemail.com>
Date: 2006-09-11 19:53:42 CEST

I realise this is off-topic for SDL, but I know that there are many
people here who will have dealt with this problem and it will most
likely be relevant for people trying to make their code portable:

How does one create shared libraries on OS X?

I used to use this:

cc -o file1.o -c -fPIC file1.c
cc -o file2.o -c -fPIC file2.c
cc -o file3.o -c -fPIC file3.c
libtool -dynamic -o libfile.dylib file1.o file2.o file3.o -lc

This works on everything pre OS X 10.4. Note that libtool isn't
GNU libtool, it's some utility bundled with OS X. That caught me
out at first! OS X 10.4 fails with some linker errors:

ld: for architecture ppc
ld: Undefined symbols:
libtool: internal link edit command failed

Not really much help, to be honest.

The ADC site suggests a method that looks very odd, and even
suggests that modifications to the source must be made, which
is unnacceptable in my view (it smells of vendor lock-in).

Any suggestions?


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Sep 11 20:36:09 2006

This is an archived mail posted to the Subversion Users mailing list.