alpaqa no-casadi-dep
Nonconvex constrained optimization
Loading...
Searching...
No Matches
dl.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <alpaqa/export.h>
4#include <filesystem>
5#include <memory>
6#include <stdexcept>
7
8namespace alpaqa ::util {
9
10/// Failed to load a DLL or SO file, or failed to access a function in it.
11struct ALPAQA_EXPORT dynamic_load_error : std::runtime_error {
12 using std::runtime_error::runtime_error;
13};
14
15/// Load a DLL or SO file.
16ALPAQA_EXPORT std::shared_ptr<void>
17load_lib(const std::filesystem::path &so_filename);
18/// Get a pointer to a function inside of a loaded DLL or SO file.
19ALPAQA_EXPORT void *load_func(void *lib_handle, const std::string &name);
20
21} // namespace alpaqa::util
void * load_func(void *lib_handle, const std::string &name)
Get a pointer to a function inside of a loaded DLL or SO file.
std::shared_ptr< void > load_lib(const std::filesystem::path &so_filename)
Load a DLL or SO file.
constexpr const auto inf
Definition config.hpp:112
Failed to load a DLL or SO file, or failed to access a function in it.
Definition dl.hpp:11