Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: bgolding on December 03, 2007, 07:07:26 pm

Title: Can't build C::B (SVN 4698) for Redhat Enterprise 4.0 ("wxChoice undeclared")
Post by: bgolding on December 03, 2007, 07:07:26 pm
Hi all,

As part of my "day job" I'm trying to build C::B from SVN on a RedHat system. Following these instructions:
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux (http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux)

I've successfully:

I'm using a version of g++ 3.3.6 built at our site, and also have set LINK=g++ (is this correct?) to avoid linking with 'ld', on the advice of other Linux developers here.

I've added these to my .cshrc:

When running 'make' I get 'wxChoice undeclared' errors (see attached). I suspect I'm missing a preprocessor define of 'wxUSE_CHOICE'. This makes me think that something went wrong earlier in the configure.

Any pointers appreciated :)
I can provide more info about my setup but I'm not sure what would be relevant.

[attachment deleted by admin]
Title: Re: Can't build C::B (SVN 4698) for Redhat Enterprise 4.0 ("wxChoice undeclared")
Post by: stahta01 on December 04, 2007, 03:25:57 am
Try adding an include <wx/choice.h> to file advancedcompileroptionsdlg.cpp.

If that does not work, it could be as you think an error in setup.h, but that is rare. While missing includes are common.

Tim S

Code
Index: src/plugins/compilergcc/advancedcompileroptionsdlg.cpp
===================================================================
--- src/plugins/compilergcc/advancedcompileroptionsdlg.cpp (revision 4699)
+++ src/plugins/compilergcc/advancedcompileroptionsdlg.cpp (working copy)
@@ -1,6 +1,7 @@
 #include "sdk.h"
 #ifndef CB_PRECOMP
 #include <wx/checkbox.h>
+#include <wx/choice.h>
 #include <wx/combobox.h>
 #include <wx/intl.h>
 #include <wx/listbox.h>
Title: Re: Can't build C::B (SVN 4698) for Redhat Enterprise 4.0 ("wxChoice undeclared"
Post by: thomas on December 04, 2007, 09:22:22 am
Try adding an include <wx/choice.h> to file advancedcompileroptionsdlg.cpp.
Hmm... I don't think anyone has touched that source file for 4-6 weeks. Thus, if this #include was missing, one of the several hundred Linux users building Code::Blocks regularly should have had that problem several weeks ago already, I think. (Otherwise, we seriously need to work on our communication, guys ;)).

But it's worth a shot anyway. Try it, and if it works for you, then that is better than nothing. Just, be aware that you might indeed have a setup error, so don't be surprised if you see that same error again in another project later.
Title: Re: Can't build C::B (SVN 4698) for Redhat Enterprise 4.0 ("wxChoice undeclared"
Post by: oswaldm on December 04, 2007, 10:28:09 am

Yup, I had the problem on several files in some builds. Since it were only include-files I simply added them and didn't bother of reporting it. It did improve a lot over the last two months.

Maybe it's system specific because I cannot imagine, that from large count of people who built it, nobody else reported it. My system is a SuSE Linux Enterprise Server 9 (the OP has a Redhat Enterprise 4), so maybe it's an "Enterprise" issue :))

lg,
Michael
Title: Re: Can't build C::B (SVN 4698) for Redhat Enterprise 4.0 ("wxChoice undeclared")
Post by: bgolding on December 04, 2007, 01:41:20 pm
Up and running  :D :D :D

Can someone please commit Tim S's patch. I guess most Linux users have precompiled headers enabled so they don't see this.



[attachment deleted by admin]
Title: Re: Can't build C::B (SVN 4698) for Redhat Enterprise 4.0 ("wxChoice undeclared")
Post by: stahta01 on December 05, 2007, 06:10:36 pm
Added comment to Nightly Build thread.

http://forums.codeblocks.org/index.php/topic,7402.msg56342.html#msg56342

It would be best if you confirmed it fixed the issue and state details of your system
wxWidgets Version
Linux Edition and Version

Tim S