From 6d50f0a0edb0b8e65c6581be76978e728b28c8e9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 25 Jul 2010 00:19:06 +0000 Subject: [PATCH] Only define WXUSINGDLL in DLL configurations when building wxscintilla. WXUSINGDLL shouldn't be defined in static build configurations, this results in warnings and might explain errors in MinGW build. Closes #11966. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65090 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- Makefile.in | 4 +++- build/bakefiles/scintilla.bkl | 6 +++++- build/msw/makefile.bcc | 7 +++++-- build/msw/makefile.gcc | 7 +++++-- build/msw/makefile.vc | 7 +++++-- build/msw/makefile.wat | 8 ++++++-- build/msw/wx_vc7_wxscintilla.vcproj | 24 ++++++++++++------------ build/msw/wx_vc8_wxscintilla.vcproj | 24 ++++++++++++------------ build/msw/wx_vc9_wxscintilla.vcproj | 24 ++++++++++++------------ build/msw/wx_wxscintilla.dsp | 16 ++++++++-------- 10 files changed, 73 insertions(+), 54 deletions(-) diff --git a/Makefile.in b/Makefile.in index 507f71304e..99bca80725 100644 --- a/Makefile.in +++ b/Makefile.in @@ -213,7 +213,8 @@ WXEXPAT_OBJECTS = \ wxexpat_xmltok.o WXSCINTILLA_CXXFLAGS = -DNDEBUG -I$(top_srcdir)/src/stc/scintilla/include \ -I$(top_srcdir)/src/stc/scintilla/src -D__WX__ -DSCI_LEXER -DLINK_LEXERS \ - -DWXUSINGDLL -D__WX$(TOOLKIT)__ $(____SHARED) $(CPPFLAGS) $(CXXFLAGS) + $(__wxscintilla_usingdll_p) -D__WX$(TOOLKIT)__ $(____SHARED) $(CPPFLAGS) \ + $(CXXFLAGS) WXSCINTILLA_OBJECTS = \ wxscintilla_AutoComplete.o \ wxscintilla_CallTip.o \ @@ -2044,6 +2045,7 @@ COND_USE_STC_1___wxscintilla___depname = \ @COND_SHARED_0_USE_STC_1@ = install_wxscintilla @COND_SHARED_0_USE_STC_1@__uninstall_wxscintilla___depname \ @COND_SHARED_0_USE_STC_1@ = uninstall_wxscintilla +@COND_SHARED_1@__wxscintilla_usingdll_p = -DWXUSINGDLL @COND_MONOLITHIC_0@EXTRALIBS_FOR_BASE = $(EXTRALIBS) @COND_MONOLITHIC_1@EXTRALIBS_FOR_BASE = $(EXTRALIBS) $(EXTRALIBS_GUI) @COND_MONOLITHIC_0@EXTRALIBS_FOR_GUI = $(EXTRALIBS_GUI) diff --git a/build/bakefiles/scintilla.bkl b/build/bakefiles/scintilla.bkl index 17d7926df4..dfb993d339 100644 --- a/build/bakefiles/scintilla.bkl +++ b/build/bakefiles/scintilla.bkl @@ -38,13 +38,17 @@ -w-8027 + + WXUSINGDLL + + $(SETUPHDIR) $(TOP_SRCDIR)include - WXUSINGDLL + $(wxscintilla_usingdll) __WX$(TOOLKIT)__ $(LIBDIRNAME) diff --git a/build/msw/makefile.bcc b/build/msw/makefile.bcc index b5f6810b76..7bce73dd4c 100644 --- a/build/msw/makefile.bcc +++ b/build/msw/makefile.bcc @@ -193,8 +193,8 @@ WXEXPAT_OBJECTS = \ WXSCINTILLA_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ $(__OPTIMIZEFLAG) $(__THREADSFLAG) -DNDEBUG \ -I..\..\src\stc\scintilla\include -I..\..\src\stc\scintilla\src -D__WX__ \ - -DSCI_LEXER -DLINK_LEXERS -w-8027 -I$(SETUPHDIR) -I..\..\include -DWXUSINGDLL \ - -D__WXMSW__ $(CPPFLAGS) $(CXXFLAGS) + -DSCI_LEXER -DLINK_LEXERS -w-8027 -I$(SETUPHDIR) -I..\..\include \ + $(__wxscintilla_usingdll_p) -D__WXMSW__ $(CPPFLAGS) $(CXXFLAGS) WXSCINTILLA_OBJECTS = \ $(OBJS)\wxscintilla_AutoComplete.obj \ $(OBJS)\wxscintilla_CallTip.obj \ @@ -1519,6 +1519,9 @@ __wxjpeg___depname = $(LIBDIRNAME)\wxjpeg$(WXDEBUGFLAG).lib !if "$(USE_GUI)" == "1" __wxtiff___depname = $(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).lib !endif +!if "$(SHARED)" == "1" +__wxscintilla_usingdll_p = -DWXUSINGDLL +!endif !if "$(MONOLITHIC)" == "0" EXTRALIBS_FOR_BASE = !endif diff --git a/build/msw/makefile.gcc b/build/msw/makefile.gcc index 089d12f186..f910aba2fb 100644 --- a/build/msw/makefile.gcc +++ b/build/msw/makefile.gcc @@ -180,8 +180,8 @@ WXEXPAT_OBJECTS = \ WXSCINTILLA_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ $(GCCFLAGS) -DHAVE_W32API_H -DNDEBUG -I..\..\src\stc\scintilla\include \ -I..\..\src\stc\scintilla\src -D__WX__ -DSCI_LEXER -DLINK_LEXERS \ - -I$(SETUPHDIR) -I..\..\include -DWXUSINGDLL -D__WXMSW__ $(__RTTIFLAG) \ - $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) + -I$(SETUPHDIR) -I..\..\include $(__wxscintilla_usingdll_p) -D__WXMSW__ \ + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) WXSCINTILLA_OBJECTS = \ $(OBJS)\wxscintilla_AutoComplete.o \ $(OBJS)\wxscintilla_CallTip.o \ @@ -1525,6 +1525,9 @@ endif ifeq ($(USE_GUI),1) __wxtiff___depname = $(LIBDIRNAME)\libwxtiff$(WXDEBUGFLAG).a endif +ifeq ($(SHARED),1) +__wxscintilla_usingdll_p = -DWXUSINGDLL +endif ifeq ($(MONOLITHIC),0) EXTRALIBS_FOR_BASE = endif diff --git a/build/msw/makefile.vc b/build/msw/makefile.vc index ae807397cb..6b48f3c9ff 100644 --- a/build/msw/makefile.vc +++ b/build/msw/makefile.vc @@ -193,8 +193,8 @@ WXSCINTILLA_CXXFLAGS = /M$(__RUNTIME_LIBS_100)$(__DEBUGRUNTIME) /DWIN32 \ $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) $(__NO_VC_CRTDBG_p) /DNDEBUG \ /D_CRT_SECURE_NO_WARNINGS /I..\..\src\stc\scintilla\include \ /I..\..\src\stc\scintilla\src /D__WX__ /DSCI_LEXER /DLINK_LEXERS \ - /I$(SETUPHDIR) /I..\..\include /DWXUSINGDLL /D__WXMSW__ $(__RTTIFLAG) \ - $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) + /I$(SETUPHDIR) /I..\..\include $(__wxscintilla_usingdll_p) /D__WXMSW__ \ + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) WXSCINTILLA_OBJECTS = \ $(OBJS)\wxscintilla_AutoComplete.obj \ $(OBJS)\wxscintilla_CallTip.obj \ @@ -1709,6 +1709,9 @@ __RUNTIME_LIBS_100 = D !if "$(RUNTIME_LIBS)" == "static" __RUNTIME_LIBS_100 = $(__THREADSFLAG) !endif +!if "$(SHARED)" == "1" +__wxscintilla_usingdll_p = /DWXUSINGDLL +!endif !if "$(MONOLITHIC)" == "0" EXTRALIBS_FOR_BASE = !endif diff --git a/build/msw/makefile.wat b/build/msw/makefile.wat index 77cd5b245f..f20b03f6ef 100644 --- a/build/msw/makefile.wat +++ b/build/msw/makefile.wat @@ -80,6 +80,10 @@ __wxtiff___depname = !ifeq USE_GUI 1 __wxtiff___depname = $(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).lib !endif +__wxscintilla_usingdll_p = +!ifeq SHARED 1 +__wxscintilla_usingdll_p = -dWXUSINGDLL +!endif EXTRALIBS_FOR_BASE = !ifeq MONOLITHIC 0 EXTRALIBS_FOR_BASE = @@ -3400,8 +3404,8 @@ WXEXPAT_OBJECTS = & WXSCINTILLA_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & $(__RUNTIME_LIBS) -dNDEBUG -i=..\..\src\stc\scintilla\include & -i=..\..\src\stc\scintilla\src -d__WX__ -dSCI_LEXER -dLINK_LEXERS & - -i=$(SETUPHDIR) -i=..\..\include -dWXUSINGDLL -d__WXMSW__ $(__RTTIFLAG) & - $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) + -i=$(SETUPHDIR) -i=..\..\include $(__wxscintilla_usingdll_p) -d__WXMSW__ & + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) WXSCINTILLA_OBJECTS = & $(OBJS)\wxscintilla_AutoComplete.obj & $(OBJS)\wxscintilla_CallTip.obj & diff --git a/build/msw/wx_vc7_wxscintilla.vcproj b/build/msw/wx_vc7_wxscintilla.vcproj index 8ea895e0e1..30c2a2b040 100644 --- a/build/msw/wx_vc7_wxscintilla.vcproj +++ b/build/msw/wx_vc7_wxscintilla.vcproj @@ -27,7 +27,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\src;..\..\lib\vc_lib\mswud;..\..\include" - PreprocessorDefinitions="WIN32;_LIB;_DEBUG;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__" + PreprocessorDefinitions="WIN32;_LIB;_DEBUG;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__" MinimalRebuild="TRUE" ExceptionHandling="TRUE" BasicRuntimeChecks="3" @@ -48,7 +48,7 @@ SuppressStartupBanner="TRUE"/> @@ -58,7 +58,7 @@ Name="VCPreLinkEventTool"/> @@ -111,7 +111,7 @@ Name="VCPreLinkEventTool"/> @@ -167,7 +167,7 @@ Name="VCPreLinkEventTool"/> @@ -220,7 +220,7 @@ Name="VCPreLinkEventTool"/> @@ -124,14 +124,14 @@ /> @@ -202,14 +202,14 @@ /> @@ -283,14 +283,14 @@ /> diff --git a/build/msw/wx_vc9_wxscintilla.vcproj b/build/msw/wx_vc9_wxscintilla.vcproj index 45bb141284..842a1567d6 100644 --- a/build/msw/wx_vc9_wxscintilla.vcproj +++ b/build/msw/wx_vc9_wxscintilla.vcproj @@ -43,7 +43,7 @@ /> @@ -123,7 +123,7 @@ /> @@ -201,7 +201,7 @@ /> @@ -281,7 +281,7 @@ /> diff --git a/build/msw/wx_wxscintilla.dsp b/build/msw/wx_wxscintilla.dsp index 7ce77d242d..a28af93ff5 100644 --- a/build/msw/wx_wxscintilla.dsp +++ b/build/msw/wx_wxscintilla.dsp @@ -138,8 +138,8 @@ LIB32=link.exe -lib # PROP Output_Dir "..\..\lib\vc_lib" # PROP Intermediate_Dir "vc_mswunivu\wxscintilla" # PROP Target_Dir "" -# ADD BASE CPP /nologo /FD /MD /W1 /O2 /GR /EHsc /I "..\..\src\stc\scintilla\include" /I "..\..\src\stc\scintilla\src" /I "..\..\lib\vc_lib\mswunivu" /I "..\..\include" /Zi /Fd..\..\lib\vc_lib\wxscintilla.pdb /opt:ref /opt:icf /D "WIN32" /D "_LIB" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /D "WXUSINGDLL" /D "__WXMSW__" /c -# ADD CPP /nologo /FD /MD /W1 /O2 /GR /EHsc /I "..\..\src\stc\scintilla\include" /I "..\..\src\stc\scintilla\src" /I "..\..\lib\vc_lib\mswunivu" /I "..\..\include" /Zi /Fd..\..\lib\vc_lib\wxscintilla.pdb /opt:ref /opt:icf /D "WIN32" /D "_LIB" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /D "WXUSINGDLL" /D "__WXMSW__" /c +# ADD BASE CPP /nologo /FD /MD /W1 /O2 /GR /EHsc /I "..\..\src\stc\scintilla\include" /I "..\..\src\stc\scintilla\src" /I "..\..\lib\vc_lib\mswunivu" /I "..\..\include" /Zi /Fd..\..\lib\vc_lib\wxscintilla.pdb /opt:ref /opt:icf /D "WIN32" /D "_LIB" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /D "__WXMSW__" /c +# ADD CPP /nologo /FD /MD /W1 /O2 /GR /EHsc /I "..\..\src\stc\scintilla\include" /I "..\..\src\stc\scintilla\src" /I "..\..\lib\vc_lib\mswunivu" /I "..\..\include" /Zi /Fd..\..\lib\vc_lib\wxscintilla.pdb /opt:ref /opt:icf /D "WIN32" /D "_LIB" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /D "__WXMSW__" /c # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 BSC32=bscmake.exe @@ -161,8 +161,8 @@ LIB32=link.exe -lib # PROP Output_Dir "..\..\lib\vc_lib" # PROP Intermediate_Dir "vc_mswunivud\wxscintilla" # PROP Target_Dir "" -# ADD BASE CPP /nologo /FD /MDd /W1 /Od /Gm /GR /EHsc /I "..\..\src\stc\scintilla\include" /I "..\..\src\stc\scintilla\src" /I "..\..\lib\vc_lib\mswunivud" /I "..\..\include" /Zi /Fd..\..\lib\vc_lib\wxscintillad.pdb /D "WIN32" /D "_LIB" /D "_DEBUG" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /D "WXUSINGDLL" /D "__WXMSW__" /c -# ADD CPP /nologo /FD /MDd /W1 /Od /Gm /GR /EHsc /I "..\..\src\stc\scintilla\include" /I "..\..\src\stc\scintilla\src" /I "..\..\lib\vc_lib\mswunivud" /I "..\..\include" /Zi /Fd..\..\lib\vc_lib\wxscintillad.pdb /D "WIN32" /D "_LIB" /D "_DEBUG" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /D "WXUSINGDLL" /D "__WXMSW__" /c +# ADD BASE CPP /nologo /FD /MDd /W1 /Od /Gm /GR /EHsc /I "..\..\src\stc\scintilla\include" /I "..\..\src\stc\scintilla\src" /I "..\..\lib\vc_lib\mswunivud" /I "..\..\include" /Zi /Fd..\..\lib\vc_lib\wxscintillad.pdb /D "WIN32" /D "_LIB" /D "_DEBUG" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /D "__WXMSW__" /c +# ADD CPP /nologo /FD /MDd /W1 /Od /Gm /GR /EHsc /I "..\..\src\stc\scintilla\include" /I "..\..\src\stc\scintilla\src" /I "..\..\lib\vc_lib\mswunivud" /I "..\..\include" /Zi /Fd..\..\lib\vc_lib\wxscintillad.pdb /D "WIN32" /D "_LIB" /D "_DEBUG" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /D "__WXMSW__" /c # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 BSC32=bscmake.exe @@ -184,8 +184,8 @@ LIB32=link.exe -lib # PROP Output_Dir "..\..\lib\vc_lib" # PROP Intermediate_Dir "vc_mswu\wxscintilla" # PROP Target_Dir "" -# ADD BASE CPP /nologo /FD /MD /W1 /O2 /GR /EHsc /I "..\..\src\stc\scintilla\include" /I "..\..\src\stc\scintilla\src" /I "..\..\lib\vc_lib\mswu" /I "..\..\include" /Zi /Fd..\..\lib\vc_lib\wxscintilla.pdb /opt:ref /opt:icf /D "WIN32" /D "_LIB" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /D "WXUSINGDLL" /D "__WXMSW__" /c -# ADD CPP /nologo /FD /MD /W1 /O2 /GR /EHsc /I "..\..\src\stc\scintilla\include" /I "..\..\src\stc\scintilla\src" /I "..\..\lib\vc_lib\mswu" /I "..\..\include" /Zi /Fd..\..\lib\vc_lib\wxscintilla.pdb /opt:ref /opt:icf /D "WIN32" /D "_LIB" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /D "WXUSINGDLL" /D "__WXMSW__" /c +# ADD BASE CPP /nologo /FD /MD /W1 /O2 /GR /EHsc /I "..\..\src\stc\scintilla\include" /I "..\..\src\stc\scintilla\src" /I "..\..\lib\vc_lib\mswu" /I "..\..\include" /Zi /Fd..\..\lib\vc_lib\wxscintilla.pdb /opt:ref /opt:icf /D "WIN32" /D "_LIB" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /D "__WXMSW__" /c +# ADD CPP /nologo /FD /MD /W1 /O2 /GR /EHsc /I "..\..\src\stc\scintilla\include" /I "..\..\src\stc\scintilla\src" /I "..\..\lib\vc_lib\mswu" /I "..\..\include" /Zi /Fd..\..\lib\vc_lib\wxscintilla.pdb /opt:ref /opt:icf /D "WIN32" /D "_LIB" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /D "__WXMSW__" /c # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 BSC32=bscmake.exe @@ -207,8 +207,8 @@ LIB32=link.exe -lib # PROP Output_Dir "..\..\lib\vc_lib" # PROP Intermediate_Dir "vc_mswud\wxscintilla" # PROP Target_Dir "" -# ADD BASE CPP /nologo /FD /MDd /W1 /Od /Gm /GR /EHsc /I "..\..\src\stc\scintilla\include" /I "..\..\src\stc\scintilla\src" /I "..\..\lib\vc_lib\mswud" /I "..\..\include" /Zi /Fd..\..\lib\vc_lib\wxscintillad.pdb /D "WIN32" /D "_LIB" /D "_DEBUG" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /D "WXUSINGDLL" /D "__WXMSW__" /c -# ADD CPP /nologo /FD /MDd /W1 /Od /Gm /GR /EHsc /I "..\..\src\stc\scintilla\include" /I "..\..\src\stc\scintilla\src" /I "..\..\lib\vc_lib\mswud" /I "..\..\include" /Zi /Fd..\..\lib\vc_lib\wxscintillad.pdb /D "WIN32" /D "_LIB" /D "_DEBUG" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /D "WXUSINGDLL" /D "__WXMSW__" /c +# ADD BASE CPP /nologo /FD /MDd /W1 /Od /Gm /GR /EHsc /I "..\..\src\stc\scintilla\include" /I "..\..\src\stc\scintilla\src" /I "..\..\lib\vc_lib\mswud" /I "..\..\include" /Zi /Fd..\..\lib\vc_lib\wxscintillad.pdb /D "WIN32" /D "_LIB" /D "_DEBUG" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /D "__WXMSW__" /c +# ADD CPP /nologo /FD /MDd /W1 /Od /Gm /GR /EHsc /I "..\..\src\stc\scintilla\include" /I "..\..\src\stc\scintilla\src" /I "..\..\lib\vc_lib\mswud" /I "..\..\include" /Zi /Fd..\..\lib\vc_lib\wxscintillad.pdb /D "WIN32" /D "_LIB" /D "_DEBUG" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /D "__WXMSW__" /c # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 BSC32=bscmake.exe -- 2.45.2