Define MY_DLL_BUILDING symbol for dll sample DLL build.

This is necessary to properly define MY_DLL_DECL as either WXIMPORT or
WXEXPORT depending on whether my_dll.h is included from DLL itself or from
outside it. Without this, MSVC generated warnings about inconsistent dll
linkage.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-12-07 03:04:39 +00:00
parent c118a47691
commit 9f38fe4bfc
12 changed files with 145 additions and 134 deletions

View File

@@ -231,7 +231,9 @@ unsigned wxSTDCALL MyAppLauncher(void* event)
// public DLL interface
// ----------------------------------------------------------------------------
extern "C" WXEXPORT
extern "C"
{
void run_wx_gui_from_dll(const char *title)
{
// In order to prevent conflicts with hosting app's event loop, we
@@ -291,9 +293,7 @@ void run_wx_gui_from_dll(const char *title)
wxQueueEvent(wxApp::GetInstance(), event);
}
extern "C" WXEXPORT
void wx_dll_cleanup(void)
void wx_dll_cleanup()
{
wxCriticalSectionLocker lock(gs_wxStartupCS);
@@ -311,3 +311,5 @@ void wx_dll_cleanup(void)
CloseHandle(gs_wxMainThread);
gs_wxMainThread = NULL;
}
} // extern "C"