#ifndef hello_h
#define hello_h

//basename HELLO
// Linkage specification
// for static linking, define HELLOPTR as the null string "", define HELLOSTATIC or
// define ALLSTATIC
// use -d on the compile flags
// to create a dynamic link library use -dHELLODLL
// to import from a dll use nothing

// WIN32 and __NT__ are synonymous
#if defined( WIN32) && !defined(__NT__)
#define __NT__
#endif

#if defined( __NT__) && !defined(WIN32)
#define WIN32
#endif

#if defined(ALLSTATIC) && defined(HELLODLL)
#error ALLSTATIC and HELLODLL are mutually exclusive
#endif

#if defined(ALLSTATIC) || defined(HELLOSTATIC)
#undef HELLOPTR
#define HELLOPTR
#define HELLOFNC
#elif !defined(HELLOPTR)
#ifdef __NT__
#ifdef HELLODLL
#define HELLOPTR __declspec(dllexport)
#define HELLOFNC __declspec(dllexport)
#else
#define HELLOPTR __declspec(dllimport)
#define HELLOFNC __declspec(dllimport)
#endif
#else
#define HELLOFNC
#define HELLOPTR
#endif
#endif

#ifdef __GNUC__
#ifdef HELLOFNC
#undef HELLOFNC
#endif
#define HELLOFNC
#endif

#ifdef WIN32
#define STDCALL __stdcall
#else
#define STDCALL
#endif

#ifdef WIN32
#pragma warning(disable : 4251) //4251=needs to have dll-interface
#endif

HELLOFNC void STDCALL hello_dll();

#include

#endif