| diff --git a/src/Import/src/FMI1/fmi1_import_capi.c b/src/Import/src/FMI1/fmi1_import_capi.c |
| index 842c998..807cdae 100644 |
| --- a/src/Import/src/FMI1/fmi1_import_capi.c |
| +++ b/src/Import/src/FMI1/fmi1_import_capi.c |
| @@ -67,18 +67,8 @@ jm_status_enu_t fmi1_import_create_dllfmu(fmi1_import_t* fmu, fmi1_callback_func |
| return jm_status_error; |
| } |
| - if(jm_portability_set_current_working_directory(dllDirPath) != jm_status_success) { |
| - jm_log_fatal(fmu->callbacks, module, "Could not change to the DLL directory %s", dllDirPath); |
| - if(ENOENT == errno) |
| - jm_log_fatal(fmu->callbacks, module, "The FMU contains no binary for this platform."); |
| - else |
| - jm_log_fatal(fmu->callbacks, module, "System error: %s", strerror(errno)); |
| - } |
| - else { |
| - /* Allocate memory for the C-API struct */ |
| - fmu -> capi = fmi1_capi_create_dllfmu(fmu->callbacks, dllFileName, modelIdentifier, |
| callBackFunctions, standard); |
| - } |
| - |
| + /* Allocate memory for the C-API struct */ |
| + fmu -> capi = fmi1_capi_create_dllfmu(fmu->callbacks, dllFileName, modelIdentifier, callBackFunctions, |
| standard); |
| /* Load the DLL handle */ |
| if (fmu -> capi) { |
| diff --git a/src/Import/src/FMI2/fmi2_import_capi.c b/src/Import/src/FMI2/fmi2_import_capi.c |
| index e794775..a2a68ba 100644 |
| --- a/src/Import/src/FMI2/fmi2_import_capi.c |
| +++ b/src/Import/src/FMI2/fmi2_import_capi.c |
| @@ -88,18 +88,8 @@ jm_status_enu_t fmi2_import_create_dllfmu(fmi2_import_t* fmu, fmi2_fmu_kind_enu_ |
| callBackFunctions = &defaultCallbacks; |
| } |
| - if(jm_portability_set_current_working_directory(dllDirPath) != jm_status_success) { |
| - jm_log_fatal(fmu->callbacks, module, "Could not change to the DLL directory %s", dllDirPath); |
| - if(ENOENT == errno) |
| - jm_log_fatal(fmu->callbacks, module, "The FMU contains no binary for this platform."); |
| - else |
| - jm_log_fatal(fmu->callbacks, module, "System error: %s", strerror(errno)); |
| - } |
| - else { |
| - /* Allocate memory for the C-API struct */ |
| - fmu -> capi = fmi2_capi_create_dllfmu(fmu->callbacks, dllFileName, modelIdentifier, |
| callBackFunctions, fmuKind); |
| - } |
| - |
| + /* Allocate memory for the C-API struct */ |
| + fmu -> capi = fmi2_capi_create_dllfmu(fmu->callbacks, dllFileName, modelIdentifier, callBackFunctions, |
| fmuKind); |
| /* Load the DLL handle */ |
| if (fmu -> capi) { |
| diff --git a/src/Util/include/JM/jm_portability.h b/src/Util/include/JM/jm_portability.h |
| index 82e472a..3e50603 100644 |
| --- a/src/Util/include/JM/jm_portability.h |
| +++ b/src/Util/include/JM/jm_portability.h |
| @@ -65,6 +65,7 @@ jm_status_enu_t jm_portability_get_current_working_directory(char* buffer, size_ |
| jm_status_enu_t jm_portability_set_current_working_directory(const char* cwd); |
| /** \brief Get system-wide temporary directory */ |
| +FMILIB_EXPORT |
| |
| const char* jm_get_system_temp_dir(); |
| /** |
| @@ -118,6 +119,7 @@ jm_status_enu_t jm_mkdir(jm_callbacks* cb, const char* dir); |
| /** |
| \brief Remove directory and all it contents. |
| */ |
| +FMILIB_EXPORT |
| jm_status_enu_t jm_rmdir(jm_callbacks* cb, const char* dir); |
| /** |