From David Guthrie, "The call NSLookupAndBindSymbol was changed to

NSLookupSymbolInModule.  The former call would lookup the named
symbol NOT in the current dynamic library, but in the entire running
program while the call NSLookupSymbolInModule, takes the handle to
the library the symbol should be found in.  This means the current
code will fail if one loads multiple bundles at runtime and attempts
to load the same named symbol from each one."
This commit is contained in:
Robert Osfield
2005-06-24 15:30:11 +00:00
parent 914b16c9e9
commit bad47e0fe0

View File

@@ -123,7 +123,7 @@ DynamicLibrary::PROC_ADDRESS DynamicLibrary::getProcAddress(const std::string& p
std::string temp("_");
NSSymbol symbol;
temp += procName; // Mac OS X prepends an underscore on function names
symbol = NSLookupAndBindSymbol(temp.c_str());
symbol = NSLookupSymbolInModule(static_cast<NSModule>(_handle), temp.c_str());
return NSAddressOfSymbol(symbol);
#elif defined(__hpux__)
void* result = NULL;