Mimic the Windows behavior by adding to the search path of native dlls
the content of the CORE_LIBRARIES environment variable.
std::string appPath;
GetDirectory(managedAssemblyAbsolutePath, appPath);
+ // Construct native search directory paths
std::string nativeDllSearchDirs(appPath);
+ char *coreLibraries = getenv("CORE_LIBRARIES");
+ if (coreLibraries)
+ {
+ nativeDllSearchDirs.append(":");
+ nativeDllSearchDirs.append(coreLibraries);
+ }
nativeDllSearchDirs.append(":");
nativeDllSearchDirs.append(clrFilesAbsolutePath);