From 57f3866e4dc02a147f9db4434d5346c18a9527f5 Mon Sep 17 00:00:00 2001 From: Abdoulbari Zakir Date: Fri, 15 Dec 2023 05:53:09 -0800 Subject: [PATCH] fix thanks to feature/one-log-file-per-proc --- src/cpp/multisolver_interface/environment.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cpp/multisolver_interface/environment.cc b/src/cpp/multisolver_interface/environment.cc index d3f9d1f33..87e84e408 100644 --- a/src/cpp/multisolver_interface/environment.cc +++ b/src/cpp/multisolver_interface/environment.cc @@ -252,9 +252,9 @@ std::vector XpressDynamicLibraryPotentialPaths() { #if defined(_MSC_VER) // Windows potential_paths.push_back((prefix / "bin" / "xprs.dll").string()); #elif defined(__APPLE__) // OS X - potential_paths.push_back((prefix / "/lib/libxprs.dylib").string()); + potential_paths.push_back((prefix / "lib" / "libxprs.dylib").string()); #elif defined(__GNUC__) // Linux - potential_paths.push_back((prefix / "/lib/libxprs.so").string()); + potential_paths.push_back((prefix / "lib" / "libxprs.so").string()); #else std::cerr << "OS Not recognized by xpress/environment.cc." << " You won't be able to use Xpress."; @@ -294,7 +294,7 @@ bool LoadXpressDynamicLibrary(std::string& xpresspath) { for (const std::string& path : canonical_paths) { if (xpress_library.TryToLoad(path)) { std::cout << "Info: " - << "Found the Xpress library in " << path << "."; + << "Found the Xpress library in " << path << ".\n"; xpress_lib_path.clear(); std::filesystem::path p(path); p.remove_filename(); @@ -323,11 +323,11 @@ bool initXpressEnv(bool verbose, int xpress_oem_license_key) { std::string xpresspath; bool status = LoadXpressDynamicLibrary(xpresspath); if (!status) { - std::cout << "Warning: " << status << "\n"; return false; } - std::string xpress_from_env = GetXpressVarFromEnvironmentVariables("XPRESS"); + std::string xpress_from_env = + GetXpressVarFromEnvironmentVariables("XPRESSDIR"); if (xpress_from_env == "") { if (verbose) { std::cout << "Warning: Environment variable XPRESS undefined.\n"; @@ -336,7 +336,7 @@ bool initXpressEnv(bool verbose, int xpress_oem_license_key) { return false; } } else { - xpresspath = xpress_from_env; + xpresspath = (std::filesystem::path(xpress_from_env) / "bin").string(); } int code;