How to load dylib on Mac?

Max (Weijun) Wang Weijun.Wang at Sun.COM
Thu Jul 23 03:41:31 PDT 2009

Hi All

I'm totally new to C programming on Mac.

On other systems I can call dlopen("", RTLD_NOW) to return a  
non-NULL pointer to the library. However, on Mac,  
dlopen("libkrb5.dylib", RTLD_NOW) returns NULL even if I can see the / 
usr/lib/libkrb5.dylib is right there. What's wrong here?

Also, is there a way to write a cross-platform call? Say,  


More information about the bsd-port-dev mailing list