User-agent: Mozilla Thunderbird 0.7.3 (Macintosh/20040803)
Parav Pandit wrote:
Hi,
I am porting one Linux library.
This library loads other shared libraries(.so) using dlopen() , dlclose(),
dlsym().
So I have
1. loader-Lib.so
2. tobe-loaded-lib.so
written in C.
Please ignore this tech note on this issue. The use of dlopen() is perfectly
fine.
I want to convert both
1. loader-Lib.so
2. tobe-loaded-lib.so
to cocoa frameworks.
I look in the <mach-o/dyld.h> for function
NSCreateObjectFileImageFromFile().
there is says this function is supported for only MH_BUNDLE type of Mach-o
files.
Yes, you can use NSAddImage or NSAddLibrary to add a framework or dylib.
Limitation to me is I don't know how may frameworks are there to be loaded
at compile time.
I have to take path of frameworks from list.conf file.
How can I load the framework's shared library at runtime using C program and
execute its code?
Do I have to use some other APIs?
Here is the code i tried.
I urge you to revert to dlopen().
Am I posting this message to correct mailing list?
If not please direct me to correct mailing list.