From 33b838a449d2bc320c3a509b870ecbe9d620ffe4 Mon Sep 17 00:00:00 2001 From: Peter Foley Date: Mon, 11 Feb 2013 16:53:30 -0500 Subject: [PATCH] stdcall and declspec(dllexport) don't play nicely together Change-Id: I56da76771790cb6824ac3d01072d9143cb580741 --- setup_native/Library_sellangmsi.mk | 4 ++++ setup_native/source/win32/customactions/sellang/sellang.cxx | 2 +- setup_native/source/win32/customactions/sellang/sellang.def | 4 ++++ setup_native/source/win32/customactions/sellang/sorttree.cxx | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100755 setup_native/source/win32/customactions/sellang/sellang.def diff --git a/setup_native/Library_sellangmsi.mk b/setup_native/Library_sellangmsi.mk index e32e7f67126c..41b6fae897c9 100644 --- a/setup_native/Library_sellangmsi.mk +++ b/setup_native/Library_sellangmsi.mk @@ -13,6 +13,10 @@ $(eval $(call gb_Library_add_defs,sellangmsi,\ -D_STLP_USE_STATIC_LIB \ )) +$(eval $(call gb_Library_add_ldflags,sellangmsi,\ + /DEF:$(SRCDIR)/setup_native/source/win32/customactions/sellang/sellang.def \ +)) + $(eval $(call gb_Library_add_exception_objects,sellangmsi,\ setup_native/source/win32/customactions/sellang/sellang \ setup_native/source/win32/customactions/sellang/sorttree \ diff --git a/setup_native/source/win32/customactions/sellang/sellang.cxx b/setup_native/source/win32/customactions/sellang/sellang.cxx index 14576d1d31b8..b6f7ec559ea0 100644 --- a/setup_native/source/win32/customactions/sellang/sellang.cxx +++ b/setup_native/source/win32/customactions/sellang/sellang.cxx @@ -232,7 +232,7 @@ void addMatchingDictionaries( } -extern "C" __declspec(dllexport) UINT __stdcall SelectLanguage( MSIHANDLE handle ) +extern "C" UINT __stdcall SelectLanguage( MSIHANDLE handle ) { char feature[100]; MSIHANDLE database, view, record; diff --git a/setup_native/source/win32/customactions/sellang/sellang.def b/setup_native/source/win32/customactions/sellang/sellang.def new file mode 100755 index 000000000000..8d3c4d44cd00 --- /dev/null +++ b/setup_native/source/win32/customactions/sellang/sellang.def @@ -0,0 +1,4 @@ +LIBRARY "sellangmsi.dll" +EXPORTS + SelectLanguage + SortTree \ No newline at end of file diff --git a/setup_native/source/win32/customactions/sellang/sorttree.cxx b/setup_native/source/win32/customactions/sellang/sorttree.cxx index e0f3169d0a0b..9472a49bd82d 100644 --- a/setup_native/source/win32/customactions/sellang/sorttree.cxx +++ b/setup_native/source/win32/customactions/sellang/sorttree.cxx @@ -18,7 +18,7 @@ #pragma warning(pop) #endif -extern "C" __declspec(dllexport) UINT __stdcall SortTree(MSIHANDLE) +extern "C" UINT __stdcall SortTree(MSIHANDLE) { // Sort items (languages) in SelectionTree control, fdo#46355