how to build a shared object in OSX

couzteau

Registered
hello,

this question comes in two flavors:

1. how do i normally implement something like shared objects with
project buider mac os x 10.1? is that a library or a framework or ...???

2. how do i create a shared object on the command line using cc? i'm
working on a project that has been developed on linux/solaris and has
some quite sophisticated makefiles. can modify and keep them? i'
currently stuck because good ol'"cc -shared libacl.so ..." doesn't
work. the compiler is complaining because main is not defined.

thanks

jochen
 
On one side of the coin, you should read the man page
for cc and dyld. That will give you what you need.

You need to compile w/ -fPIC
and link w/ (recalling from memory)
-dynamiclib -undefined suppress -flat_namespace
 
Back
Top