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  $Id: LibraryHandler.h 1861 2010-12-21 21:34:47Z andreasw $
6 
7  Author: Stefan Vigerske
8 
9  inspired by optcc.h in gams i/o libs
10 */
11 
12 #ifndef LIBRARYHANDLER_H_
13 #define LIBRARYHANDLER_H_
14 
15 #include "IpoptConfig.h"
16 
17 #ifdef HAVE_WINDOWS_H
18 # include <windows.h>
19  typedef HINSTANCE soHandle_t;
20 #else
21 # ifdef HAVE_DLFCN_H
22 # include <unistd.h>
23 # include <dlfcn.h>
24  typedef void *soHandle_t;
25 # else
26 # define ERROR_LOADLIB
27  typedef void *soHandle_t;
28 # endif
29 #endif
30 
37 soHandle_t LSL_loadLib(const char* libname, char* msgbuf, int msglen);
38 
43 int LSL_unloadLib(soHandle_t libhandle);
44 
45 #endif /*LIBRARYHANDLER_H_*/