diff --git a/samples/dll/Makefile.in b/samples/dll/Makefile.in
index e81bca99b9..a6427fd211 100644
--- a/samples/dll/Makefile.in
+++ b/samples/dll/Makefile.in
@@ -62,6 +62,9 @@ WX_EXE_OBJECTS = \
$(__wx_exe___win32rc) \
$(__wx_exe_os2_lib_res) \
wx_exe_wx_exe.o
+SDK_EXE_CXXFLAGS = $(CPPFLAGS) $(CXXFLAGS)
+SDK_EXE_OBJECTS = \
+ sdk_exe_sdk_exe.o
### Conditionally set variables: ###
@@ -115,6 +118,13 @@ COND_PLATFORM_OS2_1___wx_exe___os2_emxbindcmd = $(NM) wx_exe$(EXEEXT) | if grep
@COND_TOOLKIT_OSX_IPHONE@ = $(__wx_exe_app_Contents_PkgInfo___depname)
@COND_TOOLKIT_COCOA@____wx_exe_BUNDLE_TGT_REF_DEP = \
@COND_TOOLKIT_COCOA@ $(__wx_exe_app_Contents_PkgInfo___depname)
+@COND_PLATFORM_WIN32_1@__sdk_exe___depname = sdk_exe$(EXEEXT)
+@COND_PLATFORM_MAC_0@__sdk_exe___mac_setfilecmd = @true
+@COND_PLATFORM_MAC_1@__sdk_exe___mac_setfilecmd = \
+@COND_PLATFORM_MAC_1@ $(SETFILE) -t APPL sdk_exe$(EXEEXT)
+COND_PLATFORM_OS2_1___sdk_exe___os2_emxbindcmd = $(NM) sdk_exe$(EXEEXT) | if \
+ grep -q pmwin.763 ; then emxbind -ep sdk_exe$(EXEEXT) ; fi
+@COND_PLATFORM_OS2_1@__sdk_exe___os2_emxbindcmd = $(COND_PLATFORM_OS2_1___sdk_exe___os2_emxbindcmd)
@COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
@COND_DEBUG_FLAG_0@__DEBUG_DEFINE_p = -DwxDEBUG_LEVEL=0
@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
@@ -149,7 +159,7 @@ COND_wxUSE_REGEX_builtin___LIB_REGEX_p = \
### Targets: ###
-all: $(__my_dll___depname) $(__wx_exe___depname) $(__wx_exe_bundle___depname)
+all: $(__my_dll___depname) $(__wx_exe___depname) $(__wx_exe_bundle___depname) $(__sdk_exe___depname)
install:
@@ -164,6 +174,7 @@ clean:
rm -f $(LIBPREFIX)my_dll.$(DLLIMP_SUFFIX)
rm -f wx_exe$(EXEEXT)
rm -rf wx_exe.app
+ rm -f sdk_exe$(EXEEXT)
distclean: clean
rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile
@@ -199,6 +210,12 @@ distclean: clean
@COND_PLATFORM_MACOSX_1_PLATFORM_WIN32_1_SHARED_0@wx_exe_bundle: $(____wx_exe_BUNDLE_TGT_REF_DEP)
+@COND_PLATFORM_WIN32_1@sdk_exe$(EXEEXT): $(SDK_EXE_OBJECTS) $(__my_dll___depname)
+@COND_PLATFORM_WIN32_1@ $(CXX) -o $@ $(SDK_EXE_OBJECTS) -L. $(LDFLAGS_GUI) $(LDFLAGS) -lmy_dll $(LIBS)
+@COND_PLATFORM_WIN32_1@
+@COND_PLATFORM_WIN32_1@ $(__sdk_exe___mac_setfilecmd)
+@COND_PLATFORM_WIN32_1@ $(__sdk_exe___os2_emxbindcmd)
+
my_dll_my_dll.o: $(srcdir)/my_dll.cpp
$(CXXC) -c -o $@ $(MY_DLL_CXXFLAGS) $(srcdir)/my_dll.cpp
@@ -208,6 +225,9 @@ wx_exe_sample_rc.o: $(srcdir)/../../samples/sample.rc
wx_exe_wx_exe.o: $(srcdir)/wx_exe.cpp
$(CXXC) -c -o $@ $(WX_EXE_CXXFLAGS) $(srcdir)/wx_exe.cpp
+sdk_exe_sdk_exe.o: $(srcdir)/sdk_exe.cpp
+ $(CXXC) -c -o $@ $(SDK_EXE_CXXFLAGS) $(srcdir)/sdk_exe.cpp
+
# Include dependency info, if present:
@IF_GNU_MAKE@-include ./.deps/*.d
diff --git a/samples/dll/dll.bkl b/samples/dll/dll.bkl
index 8c7c3e5ad5..ef8b2996a2 100644
--- a/samples/dll/dll.bkl
+++ b/samples/dll/dll.bkl
@@ -26,4 +26,10 @@
my_dll
+
+ gui
+ sdk_exe.cpp
+ my_dll
+
diff --git a/samples/dll/dll_sdk_exe.dsp b/samples/dll/dll_sdk_exe.dsp
new file mode 100644
index 0000000000..1a44f550fc
--- /dev/null
+++ b/samples/dll/dll_sdk_exe.dsp
@@ -0,0 +1,260 @@
+# Microsoft Developer Studio Project File - Name="dll_sdk_exe" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Application" 0x0101
+
+CFG=sdk_exe - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "dll_sdk_exe.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "dll_sdk_exe.mak" CFG="sdk_exe - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "sdk_exe - Win32 DLL Universal Release" (based on "Win32 (x86) Application")
+!MESSAGE "sdk_exe - Win32 DLL Universal Debug" (based on "Win32 (x86) Application")
+!MESSAGE "sdk_exe - Win32 DLL Release" (based on "Win32 (x86) Application")
+!MESSAGE "sdk_exe - Win32 DLL Debug" (based on "Win32 (x86) Application")
+!MESSAGE "sdk_exe - Win32 Universal Release" (based on "Win32 (x86) Application")
+!MESSAGE "sdk_exe - Win32 Universal Debug" (based on "Win32 (x86) Application")
+!MESSAGE "sdk_exe - Win32 Release" (based on "Win32 (x86) Application")
+!MESSAGE "sdk_exe - Win32 Debug" (based on "Win32 (x86) Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "sdk_exe - Win32 DLL Universal Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "vc_mswunivudll"
+# PROP BASE Intermediate_Dir "vc_mswunivudll\sdk_exe"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "vc_mswunivudll"
+# PROP Intermediate_Dir "vc_mswunivudll\sdk_exe"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /FD /MD /W1 /Zi /Fdvc_mswunivudll\sdk_exe.pdb /opt:ref /opt:icf /O2 /GR /EHsc /D "WIN32" /D "_WINDOWS" /c
+# ADD CPP /nologo /FD /MD /W1 /Zi /Fdvc_mswunivudll\sdk_exe.pdb /opt:ref /opt:icf /O2 /GR /EHsc /D "WIN32" /D "_WINDOWS" /c
+# ADD BASE MTL /nologo /D "WIN32" /D "_WINDOWS" /mktyplib203 /win32
+# ADD MTL /nologo /D "WIN32" /D "_WINDOWS" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d _WINDOWS
+# ADD RSC /l 0x409 /d _WINDOWS
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 vc_mswunivudll\my_dll.lib /nologo /machine:i386 /out:"vc_mswunivudll\sdk_exe.exe" /debug /pdb:"vc_mswunivudll\sdk_exe.pdb" /subsystem:windows
+# ADD LINK32 vc_mswunivudll\my_dll.lib /nologo /machine:i386 /out:"vc_mswunivudll\sdk_exe.exe" /debug /pdb:"vc_mswunivudll\sdk_exe.pdb" /subsystem:windows
+
+!ELSEIF "$(CFG)" == "sdk_exe - Win32 DLL Universal Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "vc_mswunivuddll"
+# PROP BASE Intermediate_Dir "vc_mswunivuddll\sdk_exe"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "vc_mswunivuddll"
+# PROP Intermediate_Dir "vc_mswunivuddll\sdk_exe"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /FD /MDd /W1 /Zi /Fdvc_mswunivuddll\sdk_exe.pdb /Od /Gm /GR /EHsc /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /c
+# ADD CPP /nologo /FD /MDd /W1 /Zi /Fdvc_mswunivuddll\sdk_exe.pdb /Od /Gm /GR /EHsc /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /c
+# ADD BASE MTL /nologo /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /mktyplib203 /win32
+# ADD MTL /nologo /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d _WINDOWS
+# ADD RSC /l 0x409 /d "_DEBUG" /d _WINDOWS
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 vc_mswunivuddll\my_dll.lib /nologo /machine:i386 /out:"vc_mswunivuddll\sdk_exe.exe" /debug /pdb:"vc_mswunivuddll\sdk_exe.pdb" /subsystem:windows
+# ADD LINK32 vc_mswunivuddll\my_dll.lib /nologo /machine:i386 /out:"vc_mswunivuddll\sdk_exe.exe" /debug /pdb:"vc_mswunivuddll\sdk_exe.pdb" /subsystem:windows
+
+!ELSEIF "$(CFG)" == "sdk_exe - Win32 DLL Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "vc_mswudll"
+# PROP BASE Intermediate_Dir "vc_mswudll\sdk_exe"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "vc_mswudll"
+# PROP Intermediate_Dir "vc_mswudll\sdk_exe"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /FD /MD /W1 /Zi /Fdvc_mswudll\sdk_exe.pdb /opt:ref /opt:icf /O2 /GR /EHsc /D "WIN32" /D "_WINDOWS" /c
+# ADD CPP /nologo /FD /MD /W1 /Zi /Fdvc_mswudll\sdk_exe.pdb /opt:ref /opt:icf /O2 /GR /EHsc /D "WIN32" /D "_WINDOWS" /c
+# ADD BASE MTL /nologo /D "WIN32" /D "_WINDOWS" /mktyplib203 /win32
+# ADD MTL /nologo /D "WIN32" /D "_WINDOWS" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d _WINDOWS
+# ADD RSC /l 0x409 /d _WINDOWS
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 vc_mswudll\my_dll.lib /nologo /machine:i386 /out:"vc_mswudll\sdk_exe.exe" /debug /pdb:"vc_mswudll\sdk_exe.pdb" /subsystem:windows
+# ADD LINK32 vc_mswudll\my_dll.lib /nologo /machine:i386 /out:"vc_mswudll\sdk_exe.exe" /debug /pdb:"vc_mswudll\sdk_exe.pdb" /subsystem:windows
+
+!ELSEIF "$(CFG)" == "sdk_exe - Win32 DLL Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "vc_mswuddll"
+# PROP BASE Intermediate_Dir "vc_mswuddll\sdk_exe"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "vc_mswuddll"
+# PROP Intermediate_Dir "vc_mswuddll\sdk_exe"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /FD /MDd /W1 /Zi /Fdvc_mswuddll\sdk_exe.pdb /Od /Gm /GR /EHsc /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /c
+# ADD CPP /nologo /FD /MDd /W1 /Zi /Fdvc_mswuddll\sdk_exe.pdb /Od /Gm /GR /EHsc /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /c
+# ADD BASE MTL /nologo /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /mktyplib203 /win32
+# ADD MTL /nologo /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d _WINDOWS
+# ADD RSC /l 0x409 /d "_DEBUG" /d _WINDOWS
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 vc_mswuddll\my_dll.lib /nologo /machine:i386 /out:"vc_mswuddll\sdk_exe.exe" /debug /pdb:"vc_mswuddll\sdk_exe.pdb" /subsystem:windows
+# ADD LINK32 vc_mswuddll\my_dll.lib /nologo /machine:i386 /out:"vc_mswuddll\sdk_exe.exe" /debug /pdb:"vc_mswuddll\sdk_exe.pdb" /subsystem:windows
+
+!ELSEIF "$(CFG)" == "sdk_exe - Win32 Universal Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "vc_mswunivu"
+# PROP BASE Intermediate_Dir "vc_mswunivu\sdk_exe"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "vc_mswunivu"
+# PROP Intermediate_Dir "vc_mswunivu\sdk_exe"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /FD /MD /W1 /Zi /Fdvc_mswunivu\sdk_exe.pdb /opt:ref /opt:icf /O2 /GR /EHsc /D "WIN32" /D "_WINDOWS" /c
+# ADD CPP /nologo /FD /MD /W1 /Zi /Fdvc_mswunivu\sdk_exe.pdb /opt:ref /opt:icf /O2 /GR /EHsc /D "WIN32" /D "_WINDOWS" /c
+# ADD BASE MTL /nologo /D "WIN32" /D "_WINDOWS" /mktyplib203 /win32
+# ADD MTL /nologo /D "WIN32" /D "_WINDOWS" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d _WINDOWS
+# ADD RSC /l 0x409 /d _WINDOWS
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 vc_mswunivu\my_dll.lib /nologo /machine:i386 /out:"vc_mswunivu\sdk_exe.exe" /debug /pdb:"vc_mswunivu\sdk_exe.pdb" /subsystem:windows
+# ADD LINK32 vc_mswunivu\my_dll.lib /nologo /machine:i386 /out:"vc_mswunivu\sdk_exe.exe" /debug /pdb:"vc_mswunivu\sdk_exe.pdb" /subsystem:windows
+
+!ELSEIF "$(CFG)" == "sdk_exe - Win32 Universal Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "vc_mswunivud"
+# PROP BASE Intermediate_Dir "vc_mswunivud\sdk_exe"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "vc_mswunivud"
+# PROP Intermediate_Dir "vc_mswunivud\sdk_exe"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /FD /MDd /W1 /Zi /Fdvc_mswunivud\sdk_exe.pdb /Od /Gm /GR /EHsc /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /c
+# ADD CPP /nologo /FD /MDd /W1 /Zi /Fdvc_mswunivud\sdk_exe.pdb /Od /Gm /GR /EHsc /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /c
+# ADD BASE MTL /nologo /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /mktyplib203 /win32
+# ADD MTL /nologo /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d _WINDOWS
+# ADD RSC /l 0x409 /d "_DEBUG" /d _WINDOWS
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 vc_mswunivud\my_dll.lib /nologo /machine:i386 /out:"vc_mswunivud\sdk_exe.exe" /debug /pdb:"vc_mswunivud\sdk_exe.pdb" /subsystem:windows
+# ADD LINK32 vc_mswunivud\my_dll.lib /nologo /machine:i386 /out:"vc_mswunivud\sdk_exe.exe" /debug /pdb:"vc_mswunivud\sdk_exe.pdb" /subsystem:windows
+
+!ELSEIF "$(CFG)" == "sdk_exe - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "vc_mswu"
+# PROP BASE Intermediate_Dir "vc_mswu\sdk_exe"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "vc_mswu"
+# PROP Intermediate_Dir "vc_mswu\sdk_exe"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /FD /MD /W1 /Zi /Fdvc_mswu\sdk_exe.pdb /opt:ref /opt:icf /O2 /GR /EHsc /D "WIN32" /D "_WINDOWS" /c
+# ADD CPP /nologo /FD /MD /W1 /Zi /Fdvc_mswu\sdk_exe.pdb /opt:ref /opt:icf /O2 /GR /EHsc /D "WIN32" /D "_WINDOWS" /c
+# ADD BASE MTL /nologo /D "WIN32" /D "_WINDOWS" /mktyplib203 /win32
+# ADD MTL /nologo /D "WIN32" /D "_WINDOWS" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d _WINDOWS
+# ADD RSC /l 0x409 /d _WINDOWS
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 vc_mswu\my_dll.lib /nologo /machine:i386 /out:"vc_mswu\sdk_exe.exe" /debug /pdb:"vc_mswu\sdk_exe.pdb" /subsystem:windows
+# ADD LINK32 vc_mswu\my_dll.lib /nologo /machine:i386 /out:"vc_mswu\sdk_exe.exe" /debug /pdb:"vc_mswu\sdk_exe.pdb" /subsystem:windows
+
+!ELSEIF "$(CFG)" == "sdk_exe - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "vc_mswud"
+# PROP BASE Intermediate_Dir "vc_mswud\sdk_exe"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "vc_mswud"
+# PROP Intermediate_Dir "vc_mswud\sdk_exe"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /FD /MDd /W1 /Zi /Fdvc_mswud\sdk_exe.pdb /Od /Gm /GR /EHsc /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /c
+# ADD CPP /nologo /FD /MDd /W1 /Zi /Fdvc_mswud\sdk_exe.pdb /Od /Gm /GR /EHsc /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /c
+# ADD BASE MTL /nologo /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /mktyplib203 /win32
+# ADD MTL /nologo /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d _WINDOWS
+# ADD RSC /l 0x409 /d "_DEBUG" /d _WINDOWS
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 vc_mswud\my_dll.lib /nologo /machine:i386 /out:"vc_mswud\sdk_exe.exe" /debug /pdb:"vc_mswud\sdk_exe.pdb" /subsystem:windows
+# ADD LINK32 vc_mswud\my_dll.lib /nologo /machine:i386 /out:"vc_mswud\sdk_exe.exe" /debug /pdb:"vc_mswud\sdk_exe.pdb" /subsystem:windows
+
+!ENDIF
+
+# Begin Target
+
+# Name "sdk_exe - Win32 DLL Universal Release"
+# Name "sdk_exe - Win32 DLL Universal Debug"
+# Name "sdk_exe - Win32 DLL Release"
+# Name "sdk_exe - Win32 DLL Debug"
+# Name "sdk_exe - Win32 Universal Release"
+# Name "sdk_exe - Win32 Universal Debug"
+# Name "sdk_exe - Win32 Release"
+# Name "sdk_exe - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\sdk_exe.cpp
+# End Source File
+# End Group
+# End Target
+# End Project
+
diff --git a/samples/dll/dll_vc7_sdk_exe.vcproj b/samples/dll/dll_vc7_sdk_exe.vcproj
new file mode 100644
index 0000000000..f895d4fd70
--- /dev/null
+++ b/samples/dll/dll_vc7_sdk_exe.vcproj
@@ -0,0 +1,545 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/dll/dll_vc8_sdk_exe.vcproj b/samples/dll/dll_vc8_sdk_exe.vcproj
new file mode 100644
index 0000000000..9ef9644f2c
--- /dev/null
+++ b/samples/dll/dll_vc8_sdk_exe.vcproj
@@ -0,0 +1,808 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/dll/dll_vc9_sdk_exe.vcproj b/samples/dll/dll_vc9_sdk_exe.vcproj
new file mode 100644
index 0000000000..3b34b5588f
--- /dev/null
+++ b/samples/dll/dll_vc9_sdk_exe.vcproj
@@ -0,0 +1,780 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/dll/makefile.bcc b/samples/dll/makefile.bcc
index 61882c8299..8b06a070eb 100644
--- a/samples/dll/makefile.bcc
+++ b/samples/dll/makefile.bcc
@@ -29,7 +29,7 @@ LIBDIRNAME = .\..\..\lib\$(COMPILER_PREFIX)_$(LIBTYPE_SUFFIX)$(CFG)
SETUPHDIR = \
$(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
MY_DLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \
- $(__OPTIMIZEFLAG) $(__THREADSFLAG_0) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
+ $(__OPTIMIZEFLAG) $(__THREADSFLAG_1) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
$(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
$(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\include \
@@ -38,7 +38,7 @@ MY_DLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \
MY_DLL_OBJECTS = \
$(OBJS)\my_dll_my_dll.obj
WX_EXE_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \
- $(__OPTIMIZEFLAG) $(__THREADSFLAG_0) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
+ $(__OPTIMIZEFLAG) $(__THREADSFLAG_1) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
$(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
$(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\include \
@@ -46,6 +46,10 @@ WX_EXE_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \
-DNOPCH $(CPPFLAGS) $(CXXFLAGS)
WX_EXE_OBJECTS = \
$(OBJS)\wx_exe_wx_exe.obj
+SDK_EXE_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \
+ $(__OPTIMIZEFLAG) $(__THREADSFLAG_1) $(CPPFLAGS) $(CXXFLAGS)
+SDK_EXE_OBJECTS = \
+ $(OBJS)\sdk_exe_sdk_exe.obj
### Conditionally set variables: ###
@@ -115,36 +119,6 @@ ____CAIRO_INCLUDEDIR_FILENAMES_3_p = -i$(CAIRO_ROOT)\include\cairo
!if "$(SHARED)" == "1"
__DLLFLAG_p_3 = -dWXUSINGDLL
!endif
-!if "$(BUILD)" == "debug"
-__OPTIMIZEFLAG = -Od
-!endif
-!if "$(BUILD)" == "release"
-__OPTIMIZEFLAG = -O2
-!endif
-!if "$(USE_THREADS)" == "0"
-__THREADSFLAG =
-!endif
-!if "$(USE_THREADS)" == "1"
-__THREADSFLAG = mt
-!endif
-!if "$(USE_THREADS)" == "0"
-__THREADSFLAG_0 =
-!endif
-!if "$(USE_THREADS)" == "1"
-__THREADSFLAG_0 = -tWM
-!endif
-!if "$(RUNTIME_LIBS)" == "dynamic"
-__RUNTIME_LIBS = -tWR
-!endif
-!if "$(RUNTIME_LIBS)" == "static"
-__RUNTIME_LIBS =
-!endif
-!if "$(RUNTIME_LIBS)" == "dynamic"
-__RUNTIME_LIBS_0 = i
-!endif
-!if "$(RUNTIME_LIBS)" == "static"
-__RUNTIME_LIBS_0 =
-!endif
!if "$(WXUNIV)" == "1"
__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
!endif
@@ -211,6 +185,36 @@ __CAIRO_LIB_p = cairo.lib
!if "$(USE_CAIRO)" == "1"
____CAIRO_LIBDIR_FILENAMES = -L$(CAIRO_ROOT)\lib
!endif
+!if "$(BUILD)" == "debug"
+__OPTIMIZEFLAG = -Od
+!endif
+!if "$(BUILD)" == "release"
+__OPTIMIZEFLAG = -O2
+!endif
+!if "$(USE_THREADS)" == "0"
+__THREADSFLAG =
+!endif
+!if "$(USE_THREADS)" == "1"
+__THREADSFLAG = mt
+!endif
+!if "$(USE_THREADS)" == "0"
+__THREADSFLAG_1 =
+!endif
+!if "$(USE_THREADS)" == "1"
+__THREADSFLAG_1 = -tWM
+!endif
+!if "$(RUNTIME_LIBS)" == "dynamic"
+__RUNTIME_LIBS = -tWR
+!endif
+!if "$(RUNTIME_LIBS)" == "static"
+__RUNTIME_LIBS =
+!endif
+!if "$(RUNTIME_LIBS)" == "dynamic"
+__RUNTIME_LIBS_1 = i
+!endif
+!if "$(RUNTIME_LIBS)" == "static"
+__RUNTIME_LIBS_1 =
+!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO = -v
!endif
@@ -231,7 +235,7 @@ $(OBJS):
### Targets: ###
-all: $(OBJS)\my_dll.dll $(__wx_exe___depname)
+all: $(OBJS)\my_dll.dll $(__wx_exe___depname) $(OBJS)\sdk_exe.exe
clean:
-if exist $(OBJS)\*.obj del $(OBJS)\*.obj
@@ -250,20 +254,31 @@ clean:
-if exist $(OBJS)\wx_exe.ild del $(OBJS)\wx_exe.ild
-if exist $(OBJS)\wx_exe.ilf del $(OBJS)\wx_exe.ilf
-if exist $(OBJS)\wx_exe.ils del $(OBJS)\wx_exe.ils
+ -if exist $(OBJS)\sdk_exe.exe del $(OBJS)\sdk_exe.exe
+ -if exist $(OBJS)\sdk_exe.tds del $(OBJS)\sdk_exe.tds
+ -if exist $(OBJS)\sdk_exe.ilc del $(OBJS)\sdk_exe.ilc
+ -if exist $(OBJS)\sdk_exe.ild del $(OBJS)\sdk_exe.ild
+ -if exist $(OBJS)\sdk_exe.ilf del $(OBJS)\sdk_exe.ilf
+ -if exist $(OBJS)\sdk_exe.ils del $(OBJS)\sdk_exe.ils
$(OBJS)\my_dll.dll: $(MY_DLL_OBJECTS)
ilink32 -Tpd -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&|
- c0d32.obj $(MY_DLL_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_0).lib,,
+ c0d32.obj $(MY_DLL_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_1).lib,,
|
implib -f $(OBJS)\my_dll $@
!if "$(SHARED)" == "0"
$(OBJS)\wx_exe.exe: $(WX_EXE_OBJECTS) $(OBJS)\wx_exe_sample.res $(OBJS)\my_dll.dll
ilink32 -Tpe -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) -aa $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&|
- c0w32.obj $(WX_EXE_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(OBJS)\my_dll.lib $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_0).lib,, $(OBJS)\wx_exe_sample.res
+ c0w32.obj $(WX_EXE_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(OBJS)\my_dll.lib $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_1).lib,, $(OBJS)\wx_exe_sample.res
|
!endif
+$(OBJS)\sdk_exe.exe: $(SDK_EXE_OBJECTS) $(OBJS)\my_dll.dll
+ ilink32 -Tpe -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -aa $(LDFLAGS) @&&|
+ c0w32.obj $(SDK_EXE_OBJECTS),$@,, $(OBJS)\my_dll.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_1).lib,,
+|
+
$(OBJS)\my_dll_my_dll.obj: .\my_dll.cpp
$(CXX) -q -c -P -o$@ $(MY_DLL_CXXFLAGS) .\my_dll.cpp
@@ -273,3 +288,6 @@ $(OBJS)\wx_exe_sample.res: .\..\..\samples\sample.rc
$(OBJS)\wx_exe_wx_exe.obj: .\wx_exe.cpp
$(CXX) -q -c -P -o$@ $(WX_EXE_CXXFLAGS) .\wx_exe.cpp
+$(OBJS)\sdk_exe_sdk_exe.obj: .\sdk_exe.cpp
+ $(CXX) -q -c -P -o$@ $(SDK_EXE_CXXFLAGS) .\sdk_exe.cpp
+
diff --git a/samples/dll/makefile.gcc b/samples/dll/makefile.gcc
index d48e2e38f7..a94211cc81 100644
--- a/samples/dll/makefile.gcc
+++ b/samples/dll/makefile.gcc
@@ -39,6 +39,11 @@ WX_EXE_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS)
WX_EXE_OBJECTS = \
$(OBJS)\wx_exe_sample_rc.o \
$(OBJS)\wx_exe_wx_exe.o
+SDK_EXE_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \
+ $(GCCFLAGS) -DHAVE_W32API_H $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) \
+ $(CXXFLAGS)
+SDK_EXE_OBJECTS = \
+ $(OBJS)\sdk_exe_sdk_exe.o
### Conditionally set variables: ###
@@ -111,24 +116,6 @@ endif
ifeq ($(SHARED),1)
__DLLFLAG_p_3 = --define WXUSINGDLL
endif
-ifeq ($(BUILD),debug)
-__OPTIMIZEFLAG = -O0
-endif
-ifeq ($(BUILD),release)
-__OPTIMIZEFLAG = -O2
-endif
-ifeq ($(USE_RTTI),0)
-__RTTIFLAG = -fno-rtti
-endif
-ifeq ($(USE_RTTI),1)
-__RTTIFLAG =
-endif
-ifeq ($(USE_EXCEPTIONS),0)
-__EXCEPTIONSFLAG = -fno-exceptions
-endif
-ifeq ($(USE_EXCEPTIONS),1)
-__EXCEPTIONSFLAG =
-endif
ifeq ($(WXUNIV),1)
__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
endif
@@ -196,6 +183,24 @@ ifeq ($(USE_CAIRO),1)
____CAIRO_LIBDIR_FILENAMES = -L$(CAIRO_ROOT)\lib
endif
ifeq ($(BUILD),debug)
+__OPTIMIZEFLAG = -O0
+endif
+ifeq ($(BUILD),release)
+__OPTIMIZEFLAG = -O2
+endif
+ifeq ($(USE_RTTI),0)
+__RTTIFLAG = -fno-rtti
+endif
+ifeq ($(USE_RTTI),1)
+__RTTIFLAG =
+endif
+ifeq ($(USE_EXCEPTIONS),0)
+__EXCEPTIONSFLAG = -fno-exceptions
+endif
+ifeq ($(USE_EXCEPTIONS),1)
+__EXCEPTIONSFLAG =
+endif
+ifeq ($(BUILD),debug)
ifeq ($(DEBUG_INFO),default)
__DEBUGINFO = -g
endif
@@ -225,7 +230,7 @@ $(OBJS):
### Targets: ###
-all: $(OBJS)\my_dll.dll $(__wx_exe___depname)
+all: $(OBJS)\my_dll.dll $(__wx_exe___depname) $(OBJS)\sdk_exe.exe
clean:
-if exist $(OBJS)\*.o del $(OBJS)\*.o
@@ -233,6 +238,7 @@ clean:
-if exist $(OBJS)\my_dll.dll del $(OBJS)\my_dll.dll
-if exist $(OBJS)\libmy_dll.a del $(OBJS)\libmy_dll.a
-if exist $(OBJS)\wx_exe.exe del $(OBJS)\wx_exe.exe
+ -if exist $(OBJS)\sdk_exe.exe del $(OBJS)\sdk_exe.exe
$(OBJS)\my_dll.dll: $(MY_DLL_OBJECTS)
$(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ $(MY_DLL_OBJECTS) -Wl,--out-implib=$(OBJS)\libmy_dll.a $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet
@@ -242,6 +248,9 @@ $(OBJS)\wx_exe.exe: $(WX_EXE_OBJECTS) $(OBJS)\wx_exe_sample_rc.o $(OBJS)\my_dll.
$(CXX) -o $@ $(WX_EXE_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(OBJS)\libmy_dll.a $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet
endif
+$(OBJS)\sdk_exe.exe: $(SDK_EXE_OBJECTS) $(OBJS)\my_dll.dll
+ $(CXX) -o $@ $(SDK_EXE_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -Wl,--subsystem,windows -mwindows $(LDFLAGS) $(OBJS)\libmy_dll.a
+
$(OBJS)\my_dll_my_dll.o: ./my_dll.cpp
$(CXX) -c -o $@ $(MY_DLL_CXXFLAGS) $(CPPDEPS) $<
@@ -251,6 +260,9 @@ $(OBJS)\wx_exe_sample_rc.o: ./../../samples/sample.rc
$(OBJS)\wx_exe_wx_exe.o: ./wx_exe.cpp
$(CXX) -c -o $@ $(WX_EXE_CXXFLAGS) $(CPPDEPS) $<
+$(OBJS)\sdk_exe_sdk_exe.o: ./sdk_exe.cpp
+ $(CXX) -c -o $@ $(SDK_EXE_CXXFLAGS) $(CPPDEPS) $<
+
.PHONY: all clean
diff --git a/samples/dll/makefile.vc b/samples/dll/makefile.vc
index f9f109b622..6488f66f0d 100644
--- a/samples/dll/makefile.vc
+++ b/samples/dll/makefile.vc
@@ -21,7 +21,7 @@ LIBDIRNAME = \
SETUPHDIR = \
$(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
MY_DLL_CXXFLAGS = /M$(__RUNTIME_LIBS_11)$(__DEBUGRUNTIME) /DWIN32 \
- $(__DEBUGINFO_1) /Fd$(OBJS)\my_dll.pdb $(____DEBUGRUNTIME) \
+ $(__DEBUGINFO_0) /Fd$(OBJS)\my_dll.pdb $(____DEBUGRUNTIME) \
$(__OPTIMIZEFLAG) $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
$(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
@@ -31,7 +31,7 @@ MY_DLL_CXXFLAGS = /M$(__RUNTIME_LIBS_11)$(__DEBUGRUNTIME) /DWIN32 \
MY_DLL_OBJECTS = \
$(OBJS)\my_dll_my_dll.obj
WX_EXE_CXXFLAGS = /M$(__RUNTIME_LIBS_25)$(__DEBUGRUNTIME) /DWIN32 \
- $(__DEBUGINFO_1) /Fd$(OBJS)\wx_exe.pdb $(____DEBUGRUNTIME) \
+ $(__DEBUGINFO_0) /Fd$(OBJS)\wx_exe.pdb $(____DEBUGRUNTIME) \
$(__OPTIMIZEFLAG) $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
$(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
@@ -43,6 +43,12 @@ WX_EXE_OBJECTS = \
$(OBJS)\wx_exe_wx_exe.obj
WX_EXE_RESOURCES = \
$(OBJS)\wx_exe_sample.res
+SDK_EXE_CXXFLAGS = /M$(__RUNTIME_LIBS_41)$(__DEBUGRUNTIME) /DWIN32 \
+ $(__DEBUGINFO_0) /Fd$(OBJS)\sdk_exe.pdb $(____DEBUGRUNTIME) \
+ $(__OPTIMIZEFLAG) $(__NO_VC_CRTDBG_p) /D_WINDOWS $(__RTTIFLAG) \
+ $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS)
+SDK_EXE_OBJECTS = \
+ $(OBJS)\sdk_exe_sdk_exe.obj
### Conditionally set variables: ###
@@ -104,7 +110,7 @@ EXTRALIBS_FOR_BASE =
EXTRALIBS_FOR_BASE =
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO_3 = $(__DEBUGRUNTIME_0)
+__DEBUGINFO_3 = $(__DEBUGRUNTIME_1)
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_3 =
@@ -113,7 +119,7 @@ __DEBUGINFO_3 =
__DEBUGINFO_3 =
!endif
!if "$(DEBUG_INFO)" == "1"
-__DEBUGINFO_3 = $(__DEBUGRUNTIME_0)
+__DEBUGINFO_3 = $(__DEBUGRUNTIME_1)
!endif
!if "$(RUNTIME_LIBS)" == "dynamic"
__RUNTIME_LIBS_11 = D
@@ -125,7 +131,7 @@ __RUNTIME_LIBS_11 = $(__THREADSFLAG)
__wx_exe___depname = $(OBJS)\wx_exe.exe
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO_17 = $(__DEBUGRUNTIME_0)
+__DEBUGINFO_17 = $(__DEBUGRUNTIME_1)
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_17 =
@@ -134,7 +140,7 @@ __DEBUGINFO_17 =
__DEBUGINFO_17 =
!endif
!if "$(DEBUG_INFO)" == "1"
-__DEBUGINFO_17 = $(__DEBUGRUNTIME_0)
+__DEBUGINFO_17 = $(__DEBUGRUNTIME_1)
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
____DEBUGRUNTIME_18_p_1 = /d _DEBUG
@@ -194,16 +200,100 @@ ____CAIRO_INCLUDEDIR_FILENAMES_3_p = /i $(CAIRO_ROOT)\include\cairo
__DLLFLAG_p_3 = /d WXUSINGDLL
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO_1 = /Zi
+__DEBUGINFO_33 = $(__DEBUGRUNTIME_1)
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO_1 =
+__DEBUGINFO_33 =
!endif
!if "$(DEBUG_INFO)" == "0"
-__DEBUGINFO_1 =
+__DEBUGINFO_33 =
!endif
!if "$(DEBUG_INFO)" == "1"
-__DEBUGINFO_1 = /Zi
+__DEBUGINFO_33 = $(__DEBUGRUNTIME_1)
+!endif
+!if "$(RUNTIME_LIBS)" == "dynamic"
+__RUNTIME_LIBS_41 = D
+!endif
+!if "$(RUNTIME_LIBS)" == "static"
+__RUNTIME_LIBS_41 = $(__THREADSFLAG)
+!endif
+!if "$(WXUNIV)" == "1"
+__WXUNIV_DEFINE_p = /D__WXUNIVERSAL__
+!endif
+!if "$(DEBUG_FLAG)" == "0"
+__DEBUG_DEFINE_p = /DwxDEBUG_LEVEL=0
+!endif
+!if "$(USE_EXCEPTIONS)" == "0"
+__EXCEPTIONS_DEFINE_p = /DwxNO_EXCEPTIONS
+!endif
+!if "$(USE_RTTI)" == "0"
+__RTTI_DEFINE_p = /DwxNO_RTTI
+!endif
+!if "$(USE_THREADS)" == "0"
+__THREAD_DEFINE_p = /DwxNO_THREADS
+!endif
+!if "$(UNICODE)" == "0"
+__UNICODE_DEFINE_p = /DwxUSE_UNICODE=0
+!endif
+!if "$(UNICODE)" == "1"
+__UNICODE_DEFINE_p = /D_UNICODE
+!endif
+!if "$(MSLU)" == "1"
+__MSLU_DEFINE_p = /DwxUSE_UNICODE_MSLU=1
+!endif
+!if "$(USE_GDIPLUS)" == "1"
+__GFXCTX_DEFINE_p = /DwxUSE_GRAPHICS_CONTEXT=1
+!endif
+!if "$(USE_CAIRO)" == "1"
+____CAIRO_INCLUDEDIR_FILENAMES = /I$(CAIRO_ROOT)\include\cairo
+!endif
+!if "$(SHARED)" == "1"
+__DLLFLAG_p = /DWXUSINGDLL
+!endif
+!if "$(MONOLITHIC)" == "0"
+__WXLIB_CORE_p = \
+ wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
+!endif
+!if "$(MONOLITHIC)" == "0"
+__WXLIB_BASE_p = \
+ wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
+!endif
+!if "$(MONOLITHIC)" == "1"
+__WXLIB_MONO_p = \
+ wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
+!endif
+!if "$(USE_GUI)" == "1"
+__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
+!endif
+!if "$(USE_GUI)" == "1"
+__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
+!endif
+!if "$(USE_GUI)" == "1"
+__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
+!endif
+!if "$(MSLU)" == "1"
+__UNICOWS_LIB_p = unicows.lib
+!endif
+!if "$(USE_GDIPLUS)" == "1"
+__GDIPLUS_LIB_p = gdiplus.lib
+!endif
+!if "$(USE_CAIRO)" == "1"
+__CAIRO_LIB_p = cairo.lib
+!endif
+!if "$(USE_CAIRO)" == "1"
+____CAIRO_LIBDIR_FILENAMES = /LIBPATH:$(CAIRO_ROOT)\lib
+!endif
+!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
+__DEBUGINFO_0 = /Zi
+!endif
+!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
+__DEBUGINFO_0 =
+!endif
+!if "$(DEBUG_INFO)" == "0"
+__DEBUGINFO_0 =
+!endif
+!if "$(DEBUG_INFO)" == "1"
+__DEBUGINFO_0 = /Zi
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO = /DEBUG
@@ -242,16 +332,16 @@ __DEBUGRUNTIME =
__DEBUGRUNTIME = d
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
-__DEBUGRUNTIME_0 =
+__DEBUGRUNTIME_1 =
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
-__DEBUGRUNTIME_0 = /opt:ref /opt:icf
+__DEBUGRUNTIME_1 = /opt:ref /opt:icf
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
-__DEBUGRUNTIME_0 = /opt:ref /opt:icf
+__DEBUGRUNTIME_1 = /opt:ref /opt:icf
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
-__DEBUGRUNTIME_0 =
+__DEBUGRUNTIME_1 =
!endif
!if "$(BUILD)" == "debug"
__OPTIMIZEFLAG = /Od
@@ -283,72 +373,6 @@ __NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1"
__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
!endif
-!if "$(WXUNIV)" == "1"
-__WXUNIV_DEFINE_p = /D__WXUNIVERSAL__
-!endif
-!if "$(DEBUG_FLAG)" == "0"
-__DEBUG_DEFINE_p = /DwxDEBUG_LEVEL=0
-!endif
-!if "$(USE_EXCEPTIONS)" == "0"
-__EXCEPTIONS_DEFINE_p = /DwxNO_EXCEPTIONS
-!endif
-!if "$(USE_RTTI)" == "0"
-__RTTI_DEFINE_p = /DwxNO_RTTI
-!endif
-!if "$(USE_THREADS)" == "0"
-__THREAD_DEFINE_p = /DwxNO_THREADS
-!endif
-!if "$(UNICODE)" == "0"
-__UNICODE_DEFINE_p = /DwxUSE_UNICODE=0
-!endif
-!if "$(UNICODE)" == "1"
-__UNICODE_DEFINE_p = /D_UNICODE
-!endif
-!if "$(MSLU)" == "1"
-__MSLU_DEFINE_p = /DwxUSE_UNICODE_MSLU=1
-!endif
-!if "$(USE_GDIPLUS)" == "1"
-__GFXCTX_DEFINE_p = /DwxUSE_GRAPHICS_CONTEXT=1
-!endif
-!if "$(USE_CAIRO)" == "1"
-____CAIRO_INCLUDEDIR_FILENAMES = /I$(CAIRO_ROOT)\include\cairo
-!endif
-!if "$(SHARED)" == "1"
-__DLLFLAG_p = /DWXUSINGDLL
-!endif
-!if "$(MONOLITHIC)" == "0"
-__WXLIB_CORE_p = \
- wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
-!endif
-!if "$(MONOLITHIC)" == "0"
-__WXLIB_BASE_p = \
- wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
-!endif
-!if "$(MONOLITHIC)" == "1"
-__WXLIB_MONO_p = \
- wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
-!endif
-!if "$(USE_GUI)" == "1"
-__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
-!endif
-!if "$(USE_GUI)" == "1"
-__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
-!endif
-!if "$(USE_GUI)" == "1"
-__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
-!endif
-!if "$(MSLU)" == "1"
-__UNICOWS_LIB_p = unicows.lib
-!endif
-!if "$(USE_GDIPLUS)" == "1"
-__GDIPLUS_LIB_p = gdiplus.lib
-!endif
-!if "$(USE_CAIRO)" == "1"
-__CAIRO_LIB_p = cairo.lib
-!endif
-!if "$(USE_CAIRO)" == "1"
-____CAIRO_LIBDIR_FILENAMES = /LIBPATH:$(CAIRO_ROOT)\lib
-!endif
all: $(OBJS)
@@ -357,7 +381,7 @@ $(OBJS):
### Targets: ###
-all: $(OBJS)\my_dll.dll $(__wx_exe___depname)
+all: $(OBJS)\my_dll.dll $(__wx_exe___depname) $(OBJS)\sdk_exe.exe
clean:
-if exist $(OBJS)\*.obj del $(OBJS)\*.obj
@@ -370,6 +394,9 @@ clean:
-if exist $(OBJS)\wx_exe.exe del $(OBJS)\wx_exe.exe
-if exist $(OBJS)\wx_exe.ilk del $(OBJS)\wx_exe.ilk
-if exist $(OBJS)\wx_exe.pdb del $(OBJS)\wx_exe.pdb
+ -if exist $(OBJS)\sdk_exe.exe del $(OBJS)\sdk_exe.exe
+ -if exist $(OBJS)\sdk_exe.ilk del $(OBJS)\sdk_exe.ilk
+ -if exist $(OBJS)\sdk_exe.pdb del $(OBJS)\sdk_exe.pdb
$(OBJS)\my_dll.dll: $(MY_DLL_OBJECTS)
link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO) /pdb:"$(OBJS)\my_dll.pdb" $(__DEBUGINFO_3) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<<
@@ -383,6 +410,11 @@ $(OBJS)\wx_exe.exe: $(WX_EXE_OBJECTS) $(OBJS)\wx_exe_sample.res $(OBJS)\my_dll.d
<<
!endif
+$(OBJS)\sdk_exe.exe: $(SDK_EXE_OBJECTS) $(OBJS)\my_dll.dll
+ link /NOLOGO /OUT:$@ $(__DEBUGINFO) /pdb:"$(OBJS)\sdk_exe.pdb" $(__DEBUGINFO_33) $(LINK_TARGET_CPU) /SUBSYSTEM:WINDOWS $(LDFLAGS) @<<
+ $(SDK_EXE_OBJECTS) $(OBJS)\my_dll.lib
+<<
+
$(OBJS)\my_dll_my_dll.obj: .\my_dll.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MY_DLL_CXXFLAGS) .\my_dll.cpp
@@ -392,3 +424,6 @@ $(OBJS)\wx_exe_sample.res: .\..\..\samples\sample.rc
$(OBJS)\wx_exe_wx_exe.obj: .\wx_exe.cpp
$(CXX) /c /nologo /TP /Fo$@ $(WX_EXE_CXXFLAGS) .\wx_exe.cpp
+$(OBJS)\sdk_exe_sdk_exe.obj: .\sdk_exe.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(SDK_EXE_CXXFLAGS) .\sdk_exe.cpp
+
diff --git a/samples/dll/makefile.wat b/samples/dll/makefile.wat
index 4becc28d7a..ff1f84fc10 100644
--- a/samples/dll/makefile.wat
+++ b/samples/dll/makefile.wat
@@ -72,22 +72,61 @@ __wx_exe___depname =
!ifeq SHARED 0
__wx_exe___depname = $(OBJS)\wx_exe.exe
!endif
-__DEBUGINFO_1 =
+__WXLIB_CORE_p =
+!ifeq MONOLITHIC 0
+__WXLIB_CORE_p = &
+ wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
+!endif
+__WXLIB_BASE_p =
+!ifeq MONOLITHIC 0
+__WXLIB_BASE_p = &
+ wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
+!endif
+__WXLIB_MONO_p =
+!ifeq MONOLITHIC 1
+__WXLIB_MONO_p = &
+ wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
+!endif
+__LIB_TIFF_p =
+!ifeq USE_GUI 1
+__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
+!endif
+__LIB_JPEG_p =
+!ifeq USE_GUI 1
+__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
+!endif
+__LIB_PNG_p =
+!ifeq USE_GUI 1
+__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
+!endif
+__GDIPLUS_LIB_p =
+!ifeq USE_GDIPLUS 1
+__GDIPLUS_LIB_p = gdiplus.lib
+!endif
+__CAIRO_LIB_p =
+!ifeq USE_CAIRO 1
+__CAIRO_LIB_p = cairo.lib
+!endif
+____CAIRO_LIBDIR_FILENAMES =
+!ifeq USE_CAIRO 1
+____CAIRO_LIBDIR_FILENAMES = libpath $(CAIRO_ROOT)\lib
+!endif
+__DEBUGINFO_0 =
!ifeq BUILD debug
!ifeq DEBUG_INFO default
-__DEBUGINFO_1 = -d2
+__DEBUGINFO_0 = -d2
!endif
!endif
!ifeq BUILD release
!ifeq DEBUG_INFO default
-__DEBUGINFO_1 = -d0
+__DEBUGINFO_0 = -d0
!endif
!endif
!ifeq DEBUG_INFO 0
-__DEBUGINFO_1 = -d0
+__DEBUGINFO_0 = -d0
!endif
!ifeq DEBUG_INFO 1
-__DEBUGINFO_1 = -d2
+__DEBUGINFO_0 = -d2
!endif
__DEBUGINFO =
!ifeq BUILD debug
@@ -141,45 +180,6 @@ __EXCEPTIONSFLAG =
!ifeq USE_EXCEPTIONS 1
__EXCEPTIONSFLAG = -xs
!endif
-__WXLIB_CORE_p =
-!ifeq MONOLITHIC 0
-__WXLIB_CORE_p = &
- wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
-!endif
-__WXLIB_BASE_p =
-!ifeq MONOLITHIC 0
-__WXLIB_BASE_p = &
- wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
-!endif
-__WXLIB_MONO_p =
-!ifeq MONOLITHIC 1
-__WXLIB_MONO_p = &
- wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
-!endif
-__LIB_TIFF_p =
-!ifeq USE_GUI 1
-__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
-!endif
-__LIB_JPEG_p =
-!ifeq USE_GUI 1
-__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
-!endif
-__LIB_PNG_p =
-!ifeq USE_GUI 1
-__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
-!endif
-__GDIPLUS_LIB_p =
-!ifeq USE_GDIPLUS 1
-__GDIPLUS_LIB_p = gdiplus.lib
-!endif
-__CAIRO_LIB_p =
-!ifeq USE_CAIRO 1
-__CAIRO_LIB_p = cairo.lib
-!endif
-____CAIRO_LIBDIR_FILENAMES =
-!ifeq USE_CAIRO 1
-____CAIRO_LIBDIR_FILENAMES = libpath $(CAIRO_ROOT)\lib
-!endif
__WXUNIV_DEFINE_p =
!ifeq WXUNIV 1
__WXUNIV_DEFINE_p = -d__WXUNIVERSAL__
@@ -229,7 +229,7 @@ OBJS = &
LIBDIRNAME = .\..\..\lib\$(COMPILER_PREFIX)_$(LIBTYPE_SUFFIX)$(CFG)
SETUPHDIR = &
$(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
-MY_DLL_CXXFLAGS = -bd $(__DEBUGINFO_1) $(__OPTIMIZEFLAG) $(__THREADSFLAG) &
+MY_DLL_CXXFLAGS = -bd $(__DEBUGINFO_0) $(__OPTIMIZEFLAG) $(__THREADSFLAG) &
$(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) &
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) &
$(__UNICODE_DEFINE_p) $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) &
@@ -238,7 +238,7 @@ MY_DLL_CXXFLAGS = -bd $(__DEBUGINFO_1) $(__OPTIMIZEFLAG) $(__THREADSFLAG) &
$(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS)
MY_DLL_OBJECTS = &
$(OBJS)\my_dll_my_dll.obj
-WX_EXE_CXXFLAGS = $(__DEBUGINFO_1) $(__OPTIMIZEFLAG) $(__THREADSFLAG) &
+WX_EXE_CXXFLAGS = $(__DEBUGINFO_0) $(__OPTIMIZEFLAG) $(__THREADSFLAG) &
$(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) &
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) &
$(__UNICODE_DEFINE_p) $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) &
@@ -247,6 +247,10 @@ WX_EXE_CXXFLAGS = $(__DEBUGINFO_1) $(__OPTIMIZEFLAG) $(__THREADSFLAG) &
$(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS)
WX_EXE_OBJECTS = &
$(OBJS)\wx_exe_wx_exe.obj
+SDK_EXE_CXXFLAGS = $(__DEBUGINFO_0) $(__OPTIMIZEFLAG) $(__THREADSFLAG) &
+ $(__RUNTIME_LIBS) $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS)
+SDK_EXE_OBJECTS = &
+ $(OBJS)\sdk_exe_sdk_exe.obj
all : $(OBJS)
@@ -255,7 +259,7 @@ $(OBJS) :
### Targets: ###
-all : .SYMBOLIC $(OBJS)\my_dll.dll $(__wx_exe___depname)
+all : .SYMBOLIC $(OBJS)\my_dll.dll $(__wx_exe___depname) $(OBJS)\sdk_exe.exe
clean : .SYMBOLIC
-if exist $(OBJS)\*.obj del $(OBJS)\*.obj
@@ -266,6 +270,7 @@ clean : .SYMBOLIC
-if exist $(OBJS)\my_dll.dll del $(OBJS)\my_dll.dll
-if exist $(OBJS)\my_dll.lib del $(OBJS)\my_dll.lib
-if exist $(OBJS)\wx_exe.exe del $(OBJS)\wx_exe.exe
+ -if exist $(OBJS)\sdk_exe.exe del $(OBJS)\sdk_exe.exe
$(OBJS)\my_dll.dll : $(MY_DLL_OBJECTS)
@%create $(OBJS)\my_dll.lbc
@@ -294,6 +299,18 @@ $(OBJS)\wx_exe.exe : $(WX_EXE_OBJECTS) $(OBJS)\wx_exe_sample.res $(OBJS)\my_dll
wlink @$(OBJS)\wx_exe.lbc
!endif
+$(OBJS)\sdk_exe.exe : $(SDK_EXE_OBJECTS) $(OBJS)\my_dll.dll
+ @%create $(OBJS)\sdk_exe.lbc
+ @%append $(OBJS)\sdk_exe.lbc option quiet
+ @%append $(OBJS)\sdk_exe.lbc name $^@
+ @%append $(OBJS)\sdk_exe.lbc option caseexact
+ @%append $(OBJS)\sdk_exe.lbc $(__DEBUGINFO) system nt_win ref '_WinMain@16' $(LDFLAGS)
+ @for %i in ($(SDK_EXE_OBJECTS)) do @%append $(OBJS)\sdk_exe.lbc file %i
+ @for %i in ( $(OBJS)\my_dll.lib) do @%append $(OBJS)\sdk_exe.lbc library %i
+ @%append $(OBJS)\sdk_exe.lbc
+ @for %i in () do @%append $(OBJS)\sdk_exe.lbc option stack=%i
+ wlink @$(OBJS)\sdk_exe.lbc
+
$(OBJS)\my_dll_my_dll.obj : .AUTODEPEND .\my_dll.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MY_DLL_CXXFLAGS) $<
@@ -303,3 +320,6 @@ $(OBJS)\wx_exe_sample.res : .AUTODEPEND .\..\..\samples\sample.rc
$(OBJS)\wx_exe_wx_exe.obj : .AUTODEPEND .\wx_exe.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(WX_EXE_CXXFLAGS) $<
+$(OBJS)\sdk_exe_sdk_exe.obj : .AUTODEPEND .\sdk_exe.cpp
+ $(CXX) -bt=nt -zq -fo=$^@ $(SDK_EXE_CXXFLAGS) $<
+
diff --git a/samples/dll/sdk_exe.cpp b/samples/dll/sdk_exe.cpp
new file mode 100644
index 0000000000..8c73ea3efe
--- /dev/null
+++ b/samples/dll/sdk_exe.cpp
@@ -0,0 +1,170 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: samples/dll/my_exe.cpp
+// Purpose: Sample showing how to use wx DLL from a Win32 application
+// Author: Vadim Zeitlin
+// Created: 2009-12-07
+// RCS-ID: $Id$
+// Copyright: (c) 2009 Vadim Zeitlin
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+/*
+ This program is intentionally as simple as possible and shouldn't be seen
+ as an example of how to write a proper Win32 application (why should you
+ want to do this anyhow when you have wxWidgets). It's just a test bed for
+ the wx DLL which it uses.
+ */
+
+// ============================================================================
+// declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include
+#include
+
+#include
+#include
+
+#include "my_dll.h"
+
+namespace
+{
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+const TCHAR *MAIN_WIN_CLASS_NAME = _TEXT("my_exe_main_win_class");
+
+const int IDB_RUN_GUI_FROM_DLL = 100;
+
+// ----------------------------------------------------------------------------
+// globals
+// ----------------------------------------------------------------------------
+
+HINSTANCE g_hInstance;
+HWND g_hwndMain;
+
+// ============================================================================
+// implementation
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// callbacks
+// ----------------------------------------------------------------------------
+
+void
+OnCommand(HWND /* hwnd */, int id, HWND /* hwndCtl */, UINT /* codeNotify */)
+{
+ if ( id == IDB_RUN_GUI_FROM_DLL )
+ {
+ run_wx_gui_from_dll("child instance");
+ }
+}
+
+void OnDestroy(HWND hwnd)
+{
+ wx_dll_cleanup();
+
+ PostQuitMessage(0);
+}
+
+LRESULT CALLBACK MainWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ switch ( msg )
+ {
+ HANDLE_MSG(hwnd, WM_COMMAND, OnCommand);
+ HANDLE_MSG(hwnd, WM_DESTROY, OnDestroy);
+
+ default:
+ return DefWindowProc(hwnd, msg, wParam, lParam);
+ }
+
+ return 0;
+}
+
+// ----------------------------------------------------------------------------
+// initialization functions
+// ----------------------------------------------------------------------------
+
+bool RegisterMainClass()
+{
+ WNDCLASS wc;
+ ZeroMemory(&wc, sizeof(wc));
+ wc.style = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW;
+ wc.lpfnWndProc = MainWndProc;
+ wc.hInstance = g_hInstance;
+ wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
+ wc.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
+ wc.lpszClassName = MAIN_WIN_CLASS_NAME;
+
+ return RegisterClass(&wc) != 0;
+}
+
+bool CreateMainWindow()
+{
+ g_hwndMain = CreateWindow
+ (
+ MAIN_WIN_CLASS_NAME,
+ _TEXT("Main Win32 app"),
+ WS_OVERLAPPEDWINDOW,
+ CW_USEDEFAULT, CW_USEDEFAULT,
+ 400, 300,
+ NULL, NULL, g_hInstance, NULL
+ );
+ if ( !g_hwndMain )
+ return false;
+
+ CreateWindow
+ (
+ _TEXT("static"),
+ _TEXT("Main Win32 application"),
+ WS_CHILD | WS_VISIBLE,
+ 10, 10, 200, 30,
+ g_hwndMain, (HMENU)-1, g_hInstance, NULL
+ );
+
+ CreateWindow
+ (
+ _TEXT("button"),
+ _TEXT("Run GUI from DLL"),
+ WS_CHILD | WS_VISIBLE | BS_DEFPUSHBUTTON,
+ 200, 200, 150, 35,
+ g_hwndMain, (HMENU)IDB_RUN_GUI_FROM_DLL, g_hInstance, NULL
+ );
+
+ return true;
+}
+
+} // anonymous namespace
+
+// ----------------------------------------------------------------------------
+// entry point
+// ----------------------------------------------------------------------------
+
+int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int nCmdShow)
+{
+ g_hInstance = hInstance;
+
+ if ( !RegisterMainClass() )
+ return 1;
+
+ if ( !CreateMainWindow() )
+ return 2;
+
+ ShowWindow(g_hwndMain, nCmdShow);
+
+ MSG msg;
+ while ( GetMessage(&msg, NULL, 0, 0) )
+ {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+
+ return 0;
+}