alpaqa pi-pico
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>
5#include <filesystem>
6#include <memory>
7#include <stdexcept>
8
9namespace alpaqa::util {
10
11/// Failed to load a DLL or SO file, or failed to access a function in it.
12struct ALPAQA_EXPORT dynamic_load_error : std::runtime_error {
13 using std::runtime_error::runtime_error;
14};
15
16/// Load a DLL or SO file.
17ALPAQA_EXPORT std::shared_ptr<void>
18load_lib(const std::filesystem::path &so_filename, DynamicLoadFlags flags);
19/// Get a pointer to a function inside of a loaded DLL or SO file.
20ALPAQA_EXPORT void *load_func(void *lib_handle, const std::string &name);
21
22} // 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.
Definition dl.cpp:66
std::shared_ptr< void > load_lib(const std::filesystem::path &so_filename, DynamicLoadFlags flags)
Load a DLL or SO file.
Definition dl.cpp:52
constexpr const auto inf
Definition config.hpp:112
Flags to be passed to dlopen.
Definition dl-flags.hpp:8
Failed to load a DLL or SO file, or failed to access a function in it.
Definition dl.hpp:12