23 #ifndef CASADI_CASADI_OS_HPP
24 #define CASADI_CASADI_OS_HPP
26 #include <casadi/core/casadi_export.h>
27 #include <casadi/core/casadi_meta.hpp>
43 #define _WIN32_WINNT 0x0502
61 #ifndef SHARED_LIBRARY_PREFIX
62 #define SHARED_LIBRARY_PREFIX CasadiMeta::shared_library_prefix()
67 #ifndef SHARED_LIBRARY_SUFFIX
68 #define SHARED_LIBRARY_SUFFIX CasadiMeta::shared_library_suffix()
74 CASADI_EXPORT std::vector<std::string> get_search_paths();
78 CASADI_EXPORT
char pathsep();
81 CASADI_EXPORT std::string filesep();
87 typedef HINSTANCE handle_t;
89 typedef void* handle_t;
92 CASADI_EXPORT handle_t open_shared_library(
const std::string& lib,
93 const std::vector<std::string> &search_paths,
94 std::string &resultpath,
95 const std::string& caller,
bool global=
false);
97 CASADI_EXPORT handle_t open_shared_library(
const std::string& lib,
98 const std::vector<std::string> &search_paths,
99 const std::string& caller,
bool global=
false);
106 CASADI_EXPORT
int close_shared_library(handle_t handle);
109 typedef void* handle_t;
113 CASADI_EXPORT std::unique_ptr<std::istream> ifstream_compat(
const std::string& utf8_path,
114 std::ios::openmode mode = std::ios::in);
116 CASADI_EXPORT std::ifstream* new_ifstream_compat(
const std::string& utf8_path,
117 std::ios::openmode mode = std::ios::in);
119 CASADI_EXPORT std::unique_ptr<std::ostream> ofstream_compat(
const std::string& utf8_path,
120 std::ios::openmode mode = std::ios::out);