This has come up a lot recently, but to answer your questions: 1 - All exported symbols on mac os x have an underscore, but mac osx is not alone in this, it is not a bug, it is just different to elf 2 - There is no such link option 3 - It is not the job of dlsym to add an underscore, platform independent code knows about this. 4 - You are supposed to port the packages :), this in some cases means adding checks for the underscore and coding around it.
But to add another comment, I was recently wondering about adding another function to finks dlcompat, dlsym_prepend_underscore - then packages which don't check for this difference can easily be ported by adding -Ddlsym=dlsym_prepend_underscore to the CFLAGS. I guess I will have to do that as this has now come up twice today. Thanks, Peter On Thursday, April 11, 2002, at 05:28 PM, Stephane Letz wrote: > Hi, > > I'm porting code that use dlopen and dlsym to load plug-ins. > I'm using the stable dlcompat library published by the Fink project. > > The dlsym code can not correctly load exported symbols with an > underscore > and I am a bit confused about that. > > - are exported symbols in a bundle always with an underscore? > - is there an link option to export symbols WITHOUT underscore? > - is it the job of dlsym to add an underscore before trying to load > the symbol with NSIsSymbolNameDefined? > - actually what are we supposed to do : create a library with exported > symbols WITHOUT underscore an use the current dlcompat, or correct the > dlsym function to load exported symbols WITH an underscore? > > Thanks > > Stephane Letz > > > Grame: Centre National de creation musicale > 9, Rue du Garet > 69001 Lyon > Tel: 04-72-07-37-00 > Fax: 04-72-07-37-01 > Web: www.grame.fr > > > > _______________________________________________ > Fink-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/fink-devel > _______________________________________________ Fink-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/fink-devel
