<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">...this may sound a bit like deja-vu, but hear me out:  It seems we need to change the s_loader.c stuff for OSX again!<DIV><BR class="khtml-block-placeholder"></DIV><DIV>...it all started recently when I was trying to compile pix_2pdp/gem2pdp/pdp2gem with my newly upgraded xcode 2.1 tools and osx 10.4.1...all of a sudden, there were old problems creeping up with undefined symbols, and after playing with it last night and browsing docs, I began to wonder if there was another way...</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>...so I decided to go back to the source:  s_loader.c...in it, osx is using NSLoadModule()...looking this up in current documentation, ya get the following good news:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><P style="margin: 0.0px 0.0px 10.0px 0.0px"><FONT class="Apple-style-span" face="Lucida Grande" size="6"><SPAN class="Apple-style-span" style="font-size: 22px;"><B>Object File Image Functions</B></SPAN></FONT></P><P style="margin: 0.0px 0.0px 12.0px 0.0px"><FONT class="Apple-style-span" face="Lucida Grande">These functions are for loading Mach-O bundle files. They are declared in </FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">/usr/include/mach-o/dyld.h</SPAN></FONT><FONT class="Apple-style-span" face="Lucida Grande">. The use of these functions is discouraged. You should use the more efficient functions described in </FONT><A href="file:///Developer/ADC%20Reference%20Library/documentation/DeveloperTools/Reference/MachOReference/Reference/chapter_1.2_section_2.html#//apple_ref/doc/uid/TP40001398-//apple_ref/doc/uid/TP40001414-315644-BAJHGHCD"><FONT class="Apple-style-span" face="Lucida Grande"><FONT class="Apple-style-span" color="#0000FF">“Dynamic Loader Compatibility Functions”</FONT></FONT></A><FONT class="Apple-style-span" face="Lucida Grande">.</FONT></P><DIV><FONT class="Apple-style-span" face="Lucida Grande"></FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>...then, you go to the recommended docs, and behold:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><P style="margin: 0.0px 0.0px 10.0px 0.0px"><FONT class="Apple-style-span" face="Lucida Grande" size="6"><SPAN class="Apple-style-span" style="font-size: 22px;"><B>Dynamic Loader Compatibility Functions</B></SPAN></FONT></P><P style="margin: 0.0px 0.0px 12.0px 0.0px"><FONT class="Apple-style-span" face="Lucida Grande">These are the recommended functions to use to interact with the dynamic loader. These functions work in Mac OS X v10.3 and v10.4. However, in Mac OS X v10.4 they are more efficient that other image-loading functions. These functions are declared in </FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">/usr/include/dlfcn.h</SPAN></FONT><FONT class="Apple-style-span" face="Lucida Grande">.</FONT></P><DIV>...these are the typical dlopen/dlclose/dlwhatever functions, so, it appears osx has caught up to linux :-)  </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>...There are of course many questions that'll have to be addressed over the next few days:  the most important would be "will currently compiled externals be loadable "as is" if we switch to the new dynamic loaders?", but I won't know until I go ahead and switch over the code and try, which'll I try when I get home tonight...</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>more l8r,</DIV><DIV>jamie</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>ps:  any other views?</DIV></BODY></HTML>