Ipopt Documentation  
 
Loading...
Searching...
No Matches
LibraryHandler.h
Go to the documentation of this file.
1/* Copyright (C) 2008 GAMS Development and others
2 * All Rights Reserved.
3 * This code is published under the Eclipse Public License.
4 *
5 * Author: Stefan Vigerske
6 *
7 * inspired by optcc.h in GAMS I/O libraries
8 */
9
10#ifndef LIBRARYHANDLER_H_
11#define LIBRARYHANDLER_H_
12
13#include "IpoptConfig.h"
14
15#ifdef HAVE_WINDOWS_H
16# include <windows.h>
17typedef HINSTANCE soHandle_t;
18#ifdef small
19#undef small
20#endif
21#else
22# ifdef HAVE_DLFCN_H
23# include <unistd.h>
24# include <dlfcn.h>
25typedef void* soHandle_t;
26# else
27# define ERROR_LOADLIB
28typedef void* soHandle_t;
29# endif
30#endif
31
32#ifdef _MSC_VER
33# define SHAREDLIBEXT "dll"
34#elif defined(__APPLE__)
35# define SHAREDLIBEXT "dylib"
36#else
37# define SHAREDLIBEXT "so"
38#endif
39
48 const char* libname,
49 char* msgbuf,
50 int msglen
51);
52
58 soHandle_t libhandle
59);
60
61#endif /* LIBRARYHANDLER_H_ */
int LSL_unloadLib(soHandle_t libhandle)
Unloads a shared library.
void * soHandle_t
soHandle_t LSL_loadLib(const char *libname, char *msgbuf, int msglen)
Loads a dynamically linked library.