Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Porting from Linux, plug-ins that depend on other plug-ins



I'm running into one other issue that's related to my first problem.

To get around the problem of not being able to have plugins with dependencies on other plugins, I've reworked my makefiles to build everything as shared libraries (.dylib) and am going have the application dlopen each library as it is needed and never try to unload them.

Doing this I noticed that when I link one of my .dylib files I have to string out every single other library name they reference in order to avoid undefined references. The Linux linker only seems to require you to list the top-level dependencies.

ie: if lib1 calls functions in lib2 and lib2 calls functions in lib3... On linux you can link lib2 with -llib3, then lib1 with -llib2 and the dependency on lib3 gets pulled in automatically. On Darwin when you link lib1 you have to do a -llib2 -llib3 or you will get an error something like:

Illegal reference to symbol "some symbol": internal link edit command failed
"some symbol" defined in indirectly referenced dynamic library "lib3"

When I build each library I setup the -o to be the full pathname of where the library is to be loaded from, so the install names of each library should have the info the linker needs to find them.

Is there any way to make this process a bit simpler so that all the indirect references don't need to be listed?

Greg Corson
Sony R&D
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: Porting from Linux, plug-ins that depend on other plug-ins (From: Brian Edginton <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.