Ipopt  trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
LibraryHandler.h
Go to the documentation of this file.
00001 /* Copyright (C) 2008 GAMS Development and others
00002  All Rights Reserved.
00003  This code is published under the Eclipse Public License.
00004 
00005  $Id$
00006 
00007  Author: Stefan Vigerske
00008 
00009  inspired by optcc.h in gams i/o libs
00010 */
00011 
00012 #ifndef LIBRARYHANDLER_H_
00013 #define LIBRARYHANDLER_H_
00014 
00015 #include "IpoptConfig.h"
00016 
00017 #ifdef HAVE_WINDOWS_H
00018 # include <windows.h>
00019   typedef HINSTANCE soHandle_t;
00020 #ifdef small
00021 #undef small
00022 #endif
00023 #else
00024 # ifdef HAVE_DLFCN_H
00025 #  include <unistd.h>
00026 #  include <dlfcn.h>
00027   typedef void *soHandle_t;
00028 # else
00029 #  define ERROR_LOADLIB
00030   typedef void *soHandle_t;
00031 # endif
00032 #endif
00033 
00040 soHandle_t LSL_loadLib(const char* libname, char* msgbuf, int msglen);
00041 
00046 int LSL_unloadLib(soHandle_t libhandle);
00047 
00048 #endif /*LIBRARYHANDLER_H_*/
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines