From 3149c04bb7fd79ae1b206a257b8195a209fa34c7 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sat, 5 Dec 2015 20:37:41 +1000 Subject: Resolve Linker Warning LNK4104 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://msdn.microsoft.com/en-us/library/e821azx1.aspx Some export symbols should be PRIVATE Also, don't export DLLMain. It is internal function used by CRT, and not intended to be exported. Change-Id: I48139b985aa2ee499c2005d8b0d966a2cc6dcd0c Reviewed-on: https://gerrit.libreoffice.org/20419 Tested-by: Jenkins Reviewed-by: Matúš Kukan --- shell/Library_ooofilt.mk | 5 +---- shell/Library_ooofilt_x64.mk | 5 +---- shell/Library_propertyhdl.mk | 3 +-- shell/Library_propertyhdl_x64.mk | 3 +-- shell/Library_shlxthdl.mk | 5 +---- shell/Library_shlxthdl_x64.mk | 5 +---- shell/source/win32/shlxthandler/ooofilt/ooofilt.def | 5 +++++ shell/source/win32/shlxthandler/prophdl/propertyhdl.def | 3 +++ shell/source/win32/shlxthandler/shlxthdl.def | 5 +++++ 9 files changed, 19 insertions(+), 20 deletions(-) create mode 100644 shell/source/win32/shlxthandler/ooofilt/ooofilt.def create mode 100644 shell/source/win32/shlxthandler/prophdl/propertyhdl.def create mode 100644 shell/source/win32/shlxthandler/shlxthdl.def (limited to 'shell') diff --git a/shell/Library_ooofilt.mk b/shell/Library_ooofilt.mk index d7897ca7c081..dafee1032bb6 100644 --- a/shell/Library_ooofilt.mk +++ b/shell/Library_ooofilt.mk @@ -50,10 +50,7 @@ $(eval $(call gb_Library_use_static_libraries,ooofilt,\ )) $(eval $(call gb_Library_add_ldflags,ooofilt,\ - /EXPORT:DllCanUnloadNow \ - /EXPORT:DllGetClassObject \ - /EXPORT:DllRegisterServer \ - /EXPORT:DllUnregisterServer \ + /DEF:$(SRCDIR)/shell/source/win32/shlxthandler/ooofilt/ooofilt.def \ /NODEFAULTLIB:libcmt.lib \ )) diff --git a/shell/Library_ooofilt_x64.mk b/shell/Library_ooofilt_x64.mk index 26f85cefc6b0..a9f4cd5b1be0 100644 --- a/shell/Library_ooofilt_x64.mk +++ b/shell/Library_ooofilt_x64.mk @@ -56,10 +56,7 @@ $(eval $(call gb_Library_use_static_libraries,ooofilt_x64,\ )) $(eval $(call gb_Library_add_ldflags,ooofilt_x64,\ - /EXPORT:DllCanUnloadNow \ - /EXPORT:DllGetClassObject \ - /EXPORT:DllRegisterServer \ - /EXPORT:DllUnregisterServer \ + /DEF:$(SRCDIR)/shell/source/win32/shlxthandler/ooofilt/ooofilt.def \ /NODEFAULTLIB:libcmt.lib \ )) diff --git a/shell/Library_propertyhdl.mk b/shell/Library_propertyhdl.mk index 31f433aaaed5..148b2eab94fc 100644 --- a/shell/Library_propertyhdl.mk +++ b/shell/Library_propertyhdl.mk @@ -48,8 +48,7 @@ $(eval $(call gb_Library_use_static_libraries,propertyhdl,\ )) $(eval $(call gb_Library_add_ldflags,propertyhdl,\ - /EXPORT:DllCanUnloadNow \ - /EXPORT:DllGetClassObject \ + /DEF:$(SRCDIR)/shell/source/win32/shlxthandler/prophdl/propertyhdl.def \ /NODEFAULTLIB:libcmt.lib \ )) diff --git a/shell/Library_propertyhdl_x64.mk b/shell/Library_propertyhdl_x64.mk index cd189287f277..9599b3d30310 100644 --- a/shell/Library_propertyhdl_x64.mk +++ b/shell/Library_propertyhdl_x64.mk @@ -57,8 +57,7 @@ $(eval $(call gb_Library_use_static_libraries,propertyhdl_x64,\ )) $(eval $(call gb_Library_add_ldflags,propertyhdl_x64,\ - /EXPORT:DllCanUnloadNow \ - /EXPORT:DllGetClassObject \ + /DEF:$(SRCDIR)/shell/source/win32/shlxthandler/prophdl/propertyhdl.def \ /NODEFAULTLIB:libcmt.lib \ )) diff --git a/shell/Library_shlxthdl.mk b/shell/Library_shlxthdl.mk index 30e8f586f7cc..be4b67e949ee 100644 --- a/shell/Library_shlxthdl.mk +++ b/shell/Library_shlxthdl.mk @@ -48,10 +48,7 @@ $(eval $(call gb_Library_use_static_libraries,shlxthdl,\ $(eval $(call gb_Library_add_nativeres,shlxthdl,shlxthdl)) $(eval $(call gb_Library_add_ldflags,shlxthdl,\ - /EXPORT:DllCanUnloadNow \ - /EXPORT:DllGetClassObject \ - /EXPORT:DllRegisterServer \ - /EXPORT:DllUnregisterServer \ + /DEF:$(SRCDIR)/shell/source/win32/shlxthandler/shlxthdl.def \ /NODEFAULTLIB:libcmt.lib \ )) diff --git a/shell/Library_shlxthdl_x64.mk b/shell/Library_shlxthdl_x64.mk index a539b729909b..fb49fa0d0363 100644 --- a/shell/Library_shlxthdl_x64.mk +++ b/shell/Library_shlxthdl_x64.mk @@ -58,10 +58,7 @@ $(eval $(call gb_Library_use_static_libraries,shlxthdl_x64,\ $(eval $(call gb_Library_add_nativeres,shlxthdl_x64,shlxthdl)) $(eval $(call gb_Library_add_ldflags,shlxthdl_x64,\ - /EXPORT:DllCanUnloadNow \ - /EXPORT:DllGetClassObject \ - /EXPORT:DllRegisterServer \ - /EXPORT:DllUnregisterServer \ + /DEF:$(SRCDIR)/shell/source/win32/shlxthandler/shlxthdl.def \ /NODEFAULTLIB:libcmt.lib \ )) diff --git a/shell/source/win32/shlxthandler/ooofilt/ooofilt.def b/shell/source/win32/shlxthandler/ooofilt/ooofilt.def new file mode 100644 index 000000000000..d731a151f0db --- /dev/null +++ b/shell/source/win32/shlxthandler/ooofilt/ooofilt.def @@ -0,0 +1,5 @@ +EXPORTS + DllCanUnloadNow PRIVATE + DllGetClassObject PRIVATE + DllRegisterServer PRIVATE + DllUnregisterServer PRIVATE diff --git a/shell/source/win32/shlxthandler/prophdl/propertyhdl.def b/shell/source/win32/shlxthandler/prophdl/propertyhdl.def new file mode 100644 index 000000000000..22b670b3c1bc --- /dev/null +++ b/shell/source/win32/shlxthandler/prophdl/propertyhdl.def @@ -0,0 +1,3 @@ +EXPORTS + DllCanUnloadNow PRIVATE + DllGetClassObject PRIVATE diff --git a/shell/source/win32/shlxthandler/shlxthdl.def b/shell/source/win32/shlxthandler/shlxthdl.def new file mode 100644 index 000000000000..d731a151f0db --- /dev/null +++ b/shell/source/win32/shlxthandler/shlxthdl.def @@ -0,0 +1,5 @@ +EXPORTS + DllCanUnloadNow PRIVATE + DllGetClassObject PRIVATE + DllRegisterServer PRIVATE + DllUnregisterServer PRIVATE -- cgit v1.2.3