/** @file dynload.h
    \brief This file contains the necessary definitions and
    includes for cross-platform dynamic linking.
*/

#ifndef DYNLOAD_H
#define DYNLOAD_H

#ifdef WIN32

#include <windows.h>
typedef HMODULE LIBHANDLE;

#elif defined __linux__

#include <dlfcn.h>
#define LoadLibrary(x)     dlopen(x, RTLD_NOW)
#define GetProcAddress     dlsym
#define FreeLibrary        dlclose
typedef void*              LIBHANDLE;

#else
#error ERROR: OS not supported
#endif

#endif // DYNLOAD_H
