Skip to content

Commit

Permalink
Remove __stdcall from DLL exported code to fix the 32 Bit builds
Browse files Browse the repository at this point in the history
__stdcall applies name mangling even if extern C is specified. Since we
don't use a .def file anymore in Win32 this problem appeared in the
2.2.1 release.
  • Loading branch information
codereader committed Mar 4, 2017
1 parent ffa5677 commit de3c56e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/imodule.h
Expand Up @@ -328,9 +328,10 @@ namespace module {
#if defined(WIN32)
#if defined(_MSC_VER)
// In VC++ we use this to export symbols instead of using .def files
#define DARKRADIANT_DLLEXPORT __declspec(dllexport) __stdcall
// Note: don't use __stdcall since this is adding stack bytes to the function name
#define DARKRADIANT_DLLEXPORT __declspec(dllexport)
#else
#define DARKRADIANT_DLLEXPORT __stdcall
#define DARKRADIANT_DLLEXPORT
#endif
#else
#define DARKRADIANT_DLLEXPORT
Expand Down

0 comments on commit de3c56e

Please sign in to comment.