Lugdunum  0.1.0
Library.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <lug/System/Export.hpp>
5 
6 #if defined(LUG_SYSTEM_WINDOWS)
7  #ifndef WIN32_LEAN_AND_MEAN
8  #define WIN32_LEAN_AND_MEAN
9  #endif
10  #define NOMINMAX
11  #include <Windows.h>
12 #else
13  #include <dlfcn.h>
14 #endif
15 
16 namespace lug {
17 namespace System {
18 namespace Library {
19 
20 #if defined(LUG_SYSTEM_WINDOWS)
21 using Handle = HMODULE;
22 #else
23 using Handle = void*;
24 #endif
25 
26 Handle open(const char* name);
27 void close(Handle handle);
28 
29 template<typename Function>
30 Function sym(Handle handle, const char *name);
31 
32 #include <lug/System/Library.inl>
33 
34 } // Library
35 } // System
36 } // lug
Function sym(Handle handle, const char *name)
Handle open(const char *name)
Definition: Library.inl:28
void close(Handle handle)