Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Can't build C::B (SVN 4698) for Redhat Enterprise 4.0 ("wxChoice undeclared")

(1/2) > >>

bgolding:
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

I've successfully:

* built wxGTK 2.8.7 from source
* ./bootstrap
* ./configure --with-contrib-plugins=all --prefix=/blah/foo/bar
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:

* setenv PATH "${HOME}/wx2.8.7/bin:${PATH}"
* setenv LD_LIBRARY_PATH "${HOME}/wx2.8.7/lib:${LD_LIBRARY_PATH}"
* setenv ACLOCAL_FLAGS "-I ${HOME}/wx2.8.7/share/aclocal ${ACLOCAL_FLAGS}"
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]

stahta01:
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>

--- End code ---

thomas:

--- Quote from: stahta01 on December 04, 2007, 03:25:57 am ---Try adding an include <wx/choice.h> to file advancedcompileroptionsdlg.cpp.
--- End quote ---
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.

oswaldm:

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

bgolding:
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]

Navigation

[0] Message Index

[#] Next page

Go to full version