prevent name mangling for C++ DLLs
This commit is contained in:
parent
83cab19c62
commit
d61f326f38
2 changed files with 42 additions and 34 deletions
|
|
@ -103,7 +103,11 @@ __clang__
|
||||||
# define N_FASTCALL_PTR(rettype, name) rettype (__fastcall *name)
|
# define N_FASTCALL_PTR(rettype, name) rettype (__fastcall *name)
|
||||||
# define N_SAFECALL_PTR(rettype, name) rettype (__safecall *name)
|
# define N_SAFECALL_PTR(rettype, name) rettype (__safecall *name)
|
||||||
|
|
||||||
|
# ifdef __cplusplus
|
||||||
|
# define N_LIB_EXPORT extern "C" __declspec(dllexport)
|
||||||
|
# else
|
||||||
# define N_LIB_EXPORT extern __declspec(dllexport)
|
# define N_LIB_EXPORT extern __declspec(dllexport)
|
||||||
|
# endif
|
||||||
# define N_LIB_IMPORT extern __declspec(dllimport)
|
# define N_LIB_IMPORT extern __declspec(dllimport)
|
||||||
#else
|
#else
|
||||||
# define N_CDECL(rettype, name) rettype name
|
# define N_CDECL(rettype, name) rettype name
|
||||||
|
|
@ -118,7 +122,11 @@ __clang__
|
||||||
# define N_FASTCALL_PTR(rettype, name) rettype (*name)
|
# define N_FASTCALL_PTR(rettype, name) rettype (*name)
|
||||||
# define N_SAFECALL_PTR(rettype, name) rettype (*name)
|
# define N_SAFECALL_PTR(rettype, name) rettype (*name)
|
||||||
|
|
||||||
|
# ifdef __cplusplus
|
||||||
|
# define N_LIB_EXPORT extern "C"
|
||||||
|
# else
|
||||||
# define N_LIB_EXPORT extern
|
# define N_LIB_EXPORT extern
|
||||||
|
# endif
|
||||||
# define N_LIB_IMPORT extern
|
# define N_LIB_IMPORT extern
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue