From 35d984b812c1a34d324597403dd229801484f18e Mon Sep 17 00:00:00 2001 From: bubnikv Date: Fri, 26 Oct 2018 18:31:50 +0200 Subject: [PATCH] Fixed mangling of the slic3r_main symbol on win32. --- src/slic3r_app_msvc.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/slic3r_app_msvc.cpp b/src/slic3r_app_msvc.cpp index 46090727a..9823a325d 100644 --- a/src/slic3r_app_msvc.cpp +++ b/src/slic3r_app_msvc.cpp @@ -227,7 +227,14 @@ int wmain(int argc, wchar_t **argv) } // resolve function address here - slic3r_main = (Slic3rMainFunc)GetProcAddress(hInstance_Slic3r, "slic3r_main"); + slic3r_main = (Slic3rMainFunc)GetProcAddress(hInstance_Slic3r, +#ifdef _WIN64 + // there is just a single calling conversion, therefore no mangling of the function name. + "slic3r_main" +#else // stdcall calling convention declaration + "_slic3r_main@8" +#endif + ); if (slic3r_main == nullptr) { printf("could not locate the function slic3r_main in slic3r.dll\n"); return -1;