Use the same checks as for the definition of SWIGEXPORT in swiglabels.swg. Also avoid defining __DLL_IMPORT symbol with a reserved name.
20 lines
525 B
Text
20 lines
525 B
Text
/* -----------------------------------------------------------------------------
|
|
* cheader.swg
|
|
* ----------------------------------------------------------------------------- */
|
|
|
|
%insert("cheader") %{
|
|
#ifndef SWIGIMPORT
|
|
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
|
# if defined(STATIC_LINKED)
|
|
# define SWIGDLLIMPORT
|
|
# else
|
|
# define SWIGDLLIMPORT __declspec(dllimport)
|
|
# endif
|
|
# else
|
|
# define SWIGDLLIMPORT
|
|
# endif
|
|
# define SWIGIMPORT extern SWIGDLLIMPORT
|
|
#endif
|
|
|
|
#include <stddef.h>
|
|
%}
|