User forums > Using Code::Blocks
wxSmith build
mandrav:
You 're not mentioning your gcc version, but if it is greater then 3.4 the this might be an issue with precompiled headers.
When you 're getting build errors that noone else seems to be getting, delete src/sdk/sdk.h.gch and src/plugins/contrib/wxSmith/wxsheaders.h.gch and re-run "make".
These are the precompiled headers which some times might not be rebuilt even if needed. This might be the source of your problem...
rudin:
GCC version is 3.3.6. I tried SVN rev 1629 and gain exactly the same error result.
I couldn't find file src/sdk/sdk.h.gch nor src/plugins/contrib/wxSmith/wxsheaders.h.gch.
I configure using enable-contrib option (configure --enable-contrib).
Is there anything wrong with my wxWidgets build? Some result of wx-config:
wx-config --cxxflags:
-I/opt/wx/2.6/lib/wx/include/gtk2-unicode-release-2.6 -I/opt/wx/2.6/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1
wx-config --libs:
-L/opt/wx/2.6/lib -pthread -L/usr/X11R6/lib -lwx_gtk2u-2.6
Thanks in advance for any help.
Der Meister:
The problem with gcc 3.3 is: it doesn't support precompiled headers. So it's pretty clear that you don't have src/sdk/sdk.h.gch and src/plugins/contrib/wxSmith/wxsheaders.h.gch because your compiler can't create them.
As far as I know it should be possible to compile Code::Blocks without using precompiled headers but I had major problems while trying this, too.
I don't know if any of the developers still uses gcc 3.3 so there might really be a problem with the source that just doesn't appear while precompiled headers are used.
Maybe I'll try to compile Code::Blocks with gcc 3.3.6 again to find a solution for this but for now I can obly say that gcc 3.4.4 builds revision 1629 without problems.
rudin:
Der Meister,
Thanks for your info. I'll upgrade my compiler soon.
I wish you all a happy new year!
Der Meister:
OK, I tried it. Code::Blocks compiles well without precompiled headers (that surprised me), only the wxSmith plugin needs "some" patches.
Here we go:
--- Code: --- $ svn diff src/plugins/contrib/wxSmith/
Index: src/plugins/contrib/wxSmith/wxsmithwizard.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxsmithwizard.cpp (revision 1629)
+++ src/plugins/contrib/wxSmith/wxsmithwizard.cpp (working copy)
@@ -1,6 +1,8 @@
#include "wxsheaders.h"
#include "wxsmithwizard.h"
#include "wxswizard.h"
+#include <configmanager.h>
+#include <licenses.h>
wxSmithWizard::wxSmithWizard()
{
Index: src/plugins/contrib/wxSmith/wxscoder.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxscoder.cpp (revision 1629)
+++ src/plugins/contrib/wxSmith/wxscoder.cpp (working copy)
@@ -3,6 +3,7 @@
#include <manager.h>
#include <editormanager.h>
+#include <configmanager.h>
#include <messagemanager.h>
#include <wx/ffile.h>
Index: src/plugins/contrib/wxSmith/wxsmithmime.h
===================================================================
--- src/plugins/contrib/wxSmith/wxsmithmime.h (revision 1629)
+++ src/plugins/contrib/wxSmith/wxsmithmime.h (working copy)
@@ -1,13 +1,15 @@
#ifndef WXSMITHMIME_H
#define WXSMITHMIME_H
+#include <cbplugin.h>
+
/** Helper plugin dealing with mime types */
class wxSmithMime : public cbMimePlugin
Index: src/plugins/contrib/wxSmith/wxswizard.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxswizard.cpp (revision 1629)
+++ src/plugins/contrib/wxSmith/wxswizard.cpp (working copy)
@@ -4,6 +4,7 @@
#include <wx/filename.h>
#include <cbproject.h>
#include <projectmanager.h>
+#include <configmanager.h>
#include <manager.h>
#include <messagemanager.h>
#include <customvars.h>
Index: src/plugins/contrib/wxSmith/wxsmithmime.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxsmithmime.cpp (revision 1629)
+++ src/plugins/contrib/wxSmith/wxsmithmime.cpp (working copy)
@@ -5,6 +5,8 @@
#include "resources/wxswindowres.h"
#include "wxsextresmanager.h"
+#include <licenses.h>
+
wxSmithMime::wxSmithMime()
{
m_PluginInfo.name = _("wxSmithMime");
Index: src/plugins/contrib/wxSmith/wxsglobals.h
===================================================================
--- src/plugins/contrib/wxSmith/wxsglobals.h (revision 1629)
+++ src/plugins/contrib/wxSmith/wxsglobals.h (working copy)
@@ -5,6 +5,7 @@
#include <wx/settings.h>
#include <wx/scrolwin.h>
#include <wx/propgrid/propgrid.h>
+#include <wx/propgrid/propdev.h>
#include <wx/propgrid/advprops.h>
#include <cbplugin.h>
Index: src/plugins/contrib/wxSmith/wxsmith.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxsmith.cpp (revision 1629)
+++ src/plugins/contrib/wxSmith/wxsmith.cpp (working copy)
@@ -17,6 +17,7 @@
#include <wx/notebook.h>
#include <wx/sashwin.h>
#include <configmanager.h>
+#include <cbexception.h>
#include "wxsmith.h"
#include "wxswindoweditor.h"
Index: src/plugins/contrib/wxSmith/wxsdragwindow.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxsdragwindow.cpp (revision 1629)
+++ src/plugins/contrib/wxSmith/wxsdragwindow.cpp (working copy)
@@ -4,6 +4,8 @@
#include <wx/dcclient.h>
#include <wx/dcbuffer.h>
+#include <configmanager.h>
+
#include "widget.h"
#include "wxsevent.h"
#include "wxsmith.h"
--- End code ---
And please - remove the macros from wxsglobals.h. It's really disturbing when the compiler tells you errors in code that seems not to exist. For example it couldn't find the declaration for ReadInt in one of the patched files (I think it was wxsdragwindow.cpp) - but ReadInt was never used (directly) in this file. Even more problematic is: The macros for the ConfigManager look like normal variables and not like macros. Without the "Find declaration of... " function it would probably never have found this error.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version