User forums > Nightly builds
The 27-31 October 2007 build will NOT be out.
stahta01:
Patch submitted to wxWidgets that helps to reduce warnings in compiling code::blocks
Tim S
http://sourceforge.net/tracker/index.php?func=detail&aid=1822143&group_id=9863&atid=309863
Requires code below to be added to file wx/dlimpexp.h.
--- Code: ---/* wx-2.9 introduces new macros for forward declarations, include them
* here for forward compatibility:
GCC warns about using __attribute__ (and also __declspec in mingw32 case) on
forward declarations while MSVC complains about forward declarations without
__declspec for the classes later declared with it, so we need a separate set
of macros for forward declarations to hide this difference:
*/
#if (defined(__WINDOWS__) && defined(__GNUC__))
#define WXDLLIMPEXP_FWD_BASE
#define WXDLLIMPEXP_FWD_NET
#define WXDLLIMPEXP_FWD_CORE
#define WXDLLIMPEXP_FWD_ADV
#define WXDLLIMPEXP_FWD_QA
#define WXDLLIMPEXP_FWD_HTML
#define WXDLLIMPEXP_FWD_GL
#define WXDLLIMPEXP_FWD_XML
#define WXDLLIMPEXP_FWD_XRC
#define WXDLLIMPEXP_FWD_AUI
#define WXDLLIMPEXP_FWD_RICHTEXT
#define WXDLLIMPEXP_FWD_MEDIA
#define WXDLLIMPEXP_FWD_STC
#else
#define WXDLLIMPEXP_FWD_BASE WXDLLIMPEXP_BASE
#define WXDLLIMPEXP_FWD_NET WXDLLIMPEXP_NET
#define WXDLLIMPEXP_FWD_CORE WXDLLIMPEXP_CORE
#define WXDLLIMPEXP_FWD_ADV WXDLLIMPEXP_ADV
#define WXDLLIMPEXP_FWD_QA WXDLLIMPEXP_QA
#define WXDLLIMPEXP_FWD_HTML WXDLLIMPEXP_HTML
#define WXDLLIMPEXP_FWD_GL WXDLLIMPEXP_GL
#define WXDLLIMPEXP_FWD_XML WXDLLIMPEXP_XML
#define WXDLLIMPEXP_FWD_XRC WXDLLIMPEXP_XRC
#define WXDLLIMPEXP_FWD_AUI WXDLLIMPEXP_AUI
#define WXDLLIMPEXP_FWD_RICHTEXT WXDLLIMPEXP_RICHTEXT
#define WXDLLIMPEXP_FWD_MEDIA WXDLLIMPEXP_MEDIA
#define WXDLLIMPEXP_FWD_STC WXDLLIMPEXP_STC
#endif
--- End code ---
Patch to SVN Branch 2.8 for above code addition
--- Code: ---Index: include/wx/dlimpexp.h
===================================================================
--- include/wx/dlimpexp.h (revision 49512)
+++ include/wx/dlimpexp.h (working copy)
@@ -234,22 +234,42 @@
#define WXDLLEXPORT_DATA WXDLLIMPEXP_DATA_CORE
/* wx-2.9 introduces new macros for forward declarations, include them
- * here for forward compatibility: */
-#define WXDLLIMPEXP_FWD_BASE WXDLLIMPEXP_BASE
-#define WXDLLIMPEXP_FWD_NET WXDLLIMPEXP_NET
-#define WXDLLIMPEXP_FWD_CORE WXDLLIMPEXP_CORE
-#define WXDLLIMPEXP_FWD_ADV WXDLLIMPEXP_ADV
-#define WXDLLIMPEXP_FWD_QA WXDLLIMPEXP_QA
-#define WXDLLIMPEXP_FWD_ODBC WXDLLIMPEXP_ODBC
-#define WXDLLIMPEXP_FWD_DBGRID WXDLLIMPEXP_DBGRID
-#define WXDLLIMPEXP_FWD_HTML WXDLLIMPEXP_HTML
-#define WXDLLIMPEXP_FWD_GL WXDLLIMPEXP_GL
-#define WXDLLIMPEXP_FWD_XML WXDLLIMPEXP_XML
-#define WXDLLIMPEXP_FWD_XRC WXDLLIMPEXP_XRC
-#define WXDLLIMPEXP_FWD_AUI WXDLLIMPEXP_AUI
-#define WXDLLIMPEXP_FWD_RICHTEXT WXDLLIMPEXP_RICHTEXT
-#define WXDLLIMPEXP_FWD_MEDIA WXDLLIMPEXP_MEDIA
-#define WXDLLIMPEXP_FWD_STC WXDLLIMPEXP_STC
+ * here for forward compatibility:
+
+ GCC warns about using __attribute__ (and also __declspec in mingw32 case) on
+ forward declarations while MSVC complains about forward declarations without
+ __declspec for the classes later declared with it, so we need a separate set
+ of macros for forward declarations to hide this difference:
+ */
+#if (defined(__WINDOWS__) && defined(__GNUC__))
+ #define WXDLLIMPEXP_FWD_BASE
+ #define WXDLLIMPEXP_FWD_NET
+ #define WXDLLIMPEXP_FWD_CORE
+ #define WXDLLIMPEXP_FWD_ADV
+ #define WXDLLIMPEXP_FWD_QA
+ #define WXDLLIMPEXP_FWD_HTML
+ #define WXDLLIMPEXP_FWD_GL
+ #define WXDLLIMPEXP_FWD_XML
+ #define WXDLLIMPEXP_FWD_XRC
+ #define WXDLLIMPEXP_FWD_AUI
+ #define WXDLLIMPEXP_FWD_RICHTEXT
+ #define WXDLLIMPEXP_FWD_MEDIA
+ #define WXDLLIMPEXP_FWD_STC
+#else
+ #define WXDLLIMPEXP_FWD_BASE WXDLLIMPEXP_BASE
+ #define WXDLLIMPEXP_FWD_NET WXDLLIMPEXP_NET
+ #define WXDLLIMPEXP_FWD_CORE WXDLLIMPEXP_CORE
+ #define WXDLLIMPEXP_FWD_ADV WXDLLIMPEXP_ADV
+ #define WXDLLIMPEXP_FWD_QA WXDLLIMPEXP_QA
+ #define WXDLLIMPEXP_FWD_HTML WXDLLIMPEXP_HTML
+ #define WXDLLIMPEXP_FWD_GL WXDLLIMPEXP_GL
+ #define WXDLLIMPEXP_FWD_XML WXDLLIMPEXP_XML
+ #define WXDLLIMPEXP_FWD_XRC WXDLLIMPEXP_XRC
+ #define WXDLLIMPEXP_FWD_AUI WXDLLIMPEXP_AUI
+ #define WXDLLIMPEXP_FWD_RICHTEXT WXDLLIMPEXP_RICHTEXT
+ #define WXDLLIMPEXP_FWD_MEDIA WXDLLIMPEXP_MEDIA
+ #define WXDLLIMPEXP_FWD_STC WXDLLIMPEXP_STC
+#endif
#endif /* _WX_DLIMPEXP_H_ */
--- End code ---
byo:
--- Quote from: thomas on October 29, 2007, 09:26:35 am ---Byo is the only one using wxPropertyGrid. I think you should just wait for him to finish his update to the most recent version (which has been talked of a few weeks ago). Then wxPropertyGrid will be gone from the Code::Blocks SDK anyway, and possibly the warnings are magically gone too.
--- End quote ---
Ok, I'll start working on wxPropertyGrid, but it may take a while (over a week in the worst case), don't have much time now.
BYO
killerbot:
well, with the current change those warnings are also gone.
But maybe the latest wxPropertyGrid has a better solution (dunno, since I dunno that code)
stahta01:
Patch to get rid of 6 warnings building C::B project. Note, this patch is NOT MSVC compatible, but should work OK with GCC. Is it worth it to reduce the warnings by 6 for someone to test this under Linux and Mac?
I tested with MinGW GCC 4.2 SJLJ and it compiled OK. The only option I used was "-Wno-write-strings" and I had no warnings. Note, I used a patched wxWidgets 2.8.x.
Tim S
--- Code: ---Index: src/include/propgrid/include/wx/propgrid/odcombo.h
===================================================================
--- src/include/propgrid/include/wx/propgrid/odcombo.h (revision 4580)
+++ src/include/propgrid/include/wx/propgrid/odcombo.h (working copy)
@@ -37,8 +37,8 @@
#define wxPGRectContains Contains
#endif
-class WXDLLEXPORT wxTextCtrl;
-class WXDLLEXPORT wxButton;
+class wxTextCtrl;
+class wxButton;
#ifdef WXMAKINGLIB_PROPGRID
#define WXDLLEXPORT_PGODC
Index: src/include/xtra_res.h
===================================================================
--- src/include/xtra_res.h (revision 4580)
+++ src/include/xtra_res.h (working copy)
@@ -10,7 +10,7 @@
#endif
-class WXDLLEXPORT wxXmlResourceHandler;
+class wxXmlResourceHandler;
class wxToolBarAddOnXmlHandler : public wxXmlResourceHandler
{
--- End code ---
stahta01:
--- Quote from: byo on October 29, 2007, 09:46:45 pm ---
--- Quote from: thomas on October 29, 2007, 09:26:35 am ---Byo is the only one using wxPropertyGrid. I think you should just wait for him to finish his update to the most recent version (which has been talked of a few weeks ago). Then wxPropertyGrid will be gone from the Code::Blocks SDK anyway, and possibly the warnings are magically gone too.
--- End quote ---
Ok, I'll start working on wxPropertyGrid, but it may take a while (over a week in the worst case), don't have much time now.
BYO
--- End quote ---
FYI: They just released a new version of wxPropertyGrid 1.2.10
Tim S
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version