site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com A.c: void dummy() { foo1(); foo2(); ... } [just to make sure all symbols are there - could be empty, too] gcc -dynamiclib -o libA.dylib A.c -L. -lB prog.c: int main(int argc, char **argv) { foo1(); return 0; } gcc -o prog prog.c -L. -lA Any help is highly appreciated. Thanks, Simon _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... I need to create a dylib (A) that links to another dylib (B) such that linking to A is sufficient to get the symbols of B (without linking directly to B). i.e. something like this: B.c: void foo1() {... }; void foo2() {... }; [...] gcc -dynamiclib -o libB.dylib B.c As-is it won't work, because the symbols in libB are visible only to libA and not to the prog. So I need some way to make all symbols in B exported through A. I cannot use flat name space - so please discard that right away. In fact I cannot change any flags of prog, so using - undefined dynamic_lookup for prog is not an option, either. I know that a solution exists, because that is what Apple's frameworks do if they have sub-frameworks or libs (e.g. have a look at vecLib - it contains no symbols itself but collects all symbols of the libraries it is linked to) and they use two-level namespaces. This is exactly what I need. I couldn't find anything in ld/gcc/dyld, though. This email sent to site_archiver@lists.apple.com