On Monday, October 28, 2002, at 11:42 PM, Ben Hines wrote:
On Monday, October 28, 2002, at 09:47 AM, Sean Hinde wrote:
This all works fine with Linux/Solarix etc (using dlsym etc). Does
anyone have any further suggestions?
I recommend getting rid of your custom dlopen/dlsym compatibility code
and using the dlcompat library which implements dlopen/dlsym
compatibility routines for you. No reason to reinvent the wheel here.
It even has an option to prepend underscores for you if you need that.
You can download dlcompat at http://sourceforge.net/projects/fink/ .
You can include the .c file directly in your project if you want to
minimize dependencies, or just steal the code yourself, use it as a
guideline, whatever. :)
Thanks for the tip, I didn't think of looking in there Doh! (though a
few folks have reported problems compiling Erlang under Jaguar with
dlcompat installed (it used to work fine in 10.1.x).. [I just tried and
there appear to be problems - too tired to start down that road
tonight]).
Anyway I've compared the code in dlfcn_simple.c to what the Ericsson
guys did originally (for 10.0.1 I think) and it looks like it is
calling the same functions with the same parameters (apart from
NSLINKMODULE_OPTION_BINDNOW which I tried adding with no success).
Part of the problem is that I don't understand (and can't find anything
other than vague references to) the underscore issue. i.e.
* Should I need to put in any underscores at all to achieve this?
* What is it that needs them, or drives the issue?
* If they are put in to keep e.g. the linker happy how far back into
the code do I need to keep them? If dlsym uses them then should my
calling code also need to include them?
I've spent too many hours already on this - searching and reading and
randomly trying every combination but I'm pretty much still stuck.
Any explanations welcome while I plug on..
Thanks,
Sean
_______________________________________________
unix-porting mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/unix-porting
Do not post admin requests to the list. They will be ignored.