| 66 | } |
| 67 | |
| 68 | DFLibrary * OpenPlugin (std::filesystem::path filename) |
| 69 | { |
| 70 | clear_error(); |
| 71 | DFLibrary* ret = (DFLibrary*)load_library(filename); |
| 72 | if (!ret) { |
| 73 | auto error = get_error(); |
| 74 | WARN(plugins).print("OpenPlugin on {} failed: {}\n", filename.string(), error); |
| 75 | } |
| 76 | return ret; |
| 77 | } |
| 78 | void * LookupPlugin (DFLibrary * plugin ,const char * function) |
| 79 | { |
| 80 | return (void *) get_function_address(plugin, function); |