Hi all!!
I'm building codeblocks from CVS in Debian Sid following wiki Compiling Code::Blocks in Linux instructions.
I have the following error:
./configmanager.h: In member function 'void ConfigManager::Read(const wxString&, ConfigManagerContainer::SerializableObjectMap*)':
./configmanager.h:198: error: no matching function for call to 'TiXmlHandle::FirstChild(wxString&)'
./tinyxml/tinyxml.h:1458: note: candidates are: TiXmlHandle TiXmlHandle::FirstChild() const
./tinyxml/tinyxml.h:1460: note: TiXmlHandle TiXmlHandle::FirstChild(const char*) const
./configmanager.h:202: error: there are no arguments to 'wxBase64Decode' that depend on a template parameter, so a declaration of 'wxBase64Decode' must be available
./configmanager.h:202: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
make[2]: *** [sdk.h.gch] Error 1
make[2]: Leaving directory `/home/jose/instalados/codeblocks/src/sdk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jose/instalados/codeblocks/src'
make: *** [all-recursive] Error 1
Any idea?
Thanks in advance!
For the first error (configmanager.h:198) you can change the line to:
if(TiXmlNode *n = ph.FirstChild(key.c_str()).FirstChild(_T("objmap")).Node())
Or was it mb_str()?
Even though that error shouldn't occur 'cause wxString has operator const char * overloaded. Really weird g++ isn't seeing it.
Now, about wxBase64Decode... no idea. I cannot find it in the wx help file, wx headers or some other place in Code::Blocks source. Thru Google I found it defined in wxhttpengine, but I'm still wondering...
Really guys... where did you get that from?
src/sdk/base64.cpp
Anyways, I'd suggest you trying to compile Code::Blocks 1.0 RC2 because HEAD from CVS is experimenting major changes recently, so expect it to break very often.
Ok, base64.cpp has namespace wxBase64 and functions Encode and Decode, so it should be used wxBase64::Decode, but it's being used as wxBase64Decode! I cannot find how they got rid of the scope operator. Any trick? Strange compiler behavior? A weird C++ rule?
parasito: try replacing in line 202 of configmanager.h wxBase64Decode to wxBase64::Decode.
Anyway, that also explains why grep couldn't find it.
I have made both changes, but I still have the same error :(
./configmanager.h: In member function 'void ConfigManager::Read(const wxString&, ConfigManagerContainer::SerializableObjectMap*)':
./configmanager.h:198: error: no matching function for call to 'TiXmlHandle::FirstChild(const wxChar*&)'
./tinyxml/tinyxml.h:1458: note: candidates are: TiXmlHandle TiXmlHandle::FirstChild() const
./tinyxml/tinyxml.h:1460: note: TiXmlHandle TiXmlHandle::FirstChild(const char*) const
./configmanager.h:202: error: 'wxBase64' has not been declared
./configmanager.h:202: error: there are no arguments to 'Decode' that depend on a template parameter, so a declaration of 'Decode' must be available
./configmanager.h:202: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
make[2]: *** [sdk.h.gch] Error 1
make[2]: Leaving directory `/home/jose/instalados/codeblocks/src/sdk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jose/instalados/codeblocks/src'
make: *** [all-recursive] Error 1
Try including "base64.h" in configmanager.h.
That works!
But I have another error
./configmanager.h:198: error: no matching function for call to 'TiXmlHandle::Fir stChild(const wxChar*&)'
./tinyxml/tinyxml.h:1458: note: candidates are: TiXmlHandle TiXmlHandle::FirstCh ild() const
./tinyxml/tinyxml.h:1460: note: TiXmlHandle TiXmlHandle::FirstCh ild(const char*) const
make[2]: *** [sdk.h.gch] Error 1
I think I will wait some time until cvs gets more "stable".
I have build rc2 but it doesn't include wxsmith. ¿how can I include it?
Thanks
Try adding the --endable-contrib option when invoking the configure-script and then (re-)build Code::Blocks as usual.
Quote from: Der Meister on November 23, 2005, 12:55:52 PM
Try adding the --endable-contrib option when invoking the configure-script and then (re-)build Code::Blocks as usual.
./configure --enable-contrib
make
make install
but I do not have wxSmith plugin :-(
Mm... wxSmith has been recently added (in the last week) to the automake build system (--enable-contrib), so the changes are in CVS.
You can use C::B RC2,
and download wxSmith from CVS (but from one~two weeks ago), compiling from within Code::Blocks src/plugins/contrib/wxSmith/wxSmith_2_6_unix.cbp or with the Makefile src/plugins/contrib/wxSmith/Makefile.unix
Hi,
A few weeks back I built RC2 with no problems but I am having trouble with the current CVS head on Mandriva 2006.
./bootstrap
./configure --enable-contrib
make clean (as things have changed a lot recently I though I had better start with a clean slate)
make
I get a bunch of undefined references:
/bin/sh ../../libtool --mode=link g++ -g -O2 -O2 -ffast-math -I/usr/local/lib/wx/include/gtk2-ansi-release-2.6 -I/usr/local/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -o codeblocks app.o dlgabout.o dlgaboutplugin.o environmentsettingsdlg.o main.o prefix.o printdlg.o startherepage.o -L/usr/local/lib -pthread -L/usr/X11R6/lib -lwx_gtk2_xrc-2.6 -lwx_gtk2_qa-2.6 -lwx_gtk2_html-2.6 -lwx_gtk2_adv-2.6 -lwx_gtk2_core-2.6 -lwx_base_xml-2.6 -lwx_base_net-2.6 -lwx_base-2.6 -LwxDockit -lwxdockit -LwxKeyBinder -lwxkeybinder -L../sdk -lcodeblocks -lpthread -ldl -L/usr/local/lib -pthread -L/usr/X11R6/lib -lwx_gtk2_xrc-2.6 -lwx_gtk2_qa-2.6 -lwx_gtk2_html-2.6 -lwx_gtk2_adv-2.6 -lwx_gtk2_core-2.6 -lwx_base_xml-2.6 -lwx_base_net-2.6 -lwx_base-2.6
g++ -g -O2 -O2 -ffast-math -I/usr/local/lib/wx/include/gtk2-ansi-release-2.6 -I/usr/local/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -o codeblocks app.o dlgabout.o dlgaboutplugin.o environmentsettingsdlg.o main.o prefix.o printdlg.o startherepage.o -pthread -pthread -L/usr/local/lib -L/usr/X11R6/lib -L/home/les/Documents/src/codeblocks/src/src/wxDockit /home/les/Documents/src/codeblocks/src/src/wxDockit/.libs/libwxdockit.a -L/home/les/Documents/src/codeblocks/src/src/wxKeyBinder /home/les/Documents/src/codeblocks/src/src/wxKeyBinder/.libs/libwxkeybinder.a -L/home/les/Documents/src/codeblocks/src/sdk /usr/local/lib/libcodeblocks.so /usr/local/lib/libwxscintilla.so -lpthread -ldl -lwx_gtk2_xrc-2.6 -lwx_gtk2_qa-2.6 -lwx_gtk2_html-2.6 -lwx_gtk2_adv-2.6 -lwx_gtk2_core-2.6 -lwx_base_xml-2.6 -lwx_base_net-2.6 -lwx_base-2.6 -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib
/home/les/Documents/src/codeblocks/src/src/app.cpp:272: undefined reference to `Manager::GetConfigManager(wxString const&)'
/home/les/Documents/src/codeblocks/src/src/app.cpp:272: undefined reference to `ConfigManager::ReadInt(wxString const&, int)'
/home/les/Documents/src/codeblocks/src/src/app.cpp:291: undefined reference to `ConfigManager::GetDataFolder()'
/home/les/Documents/src/codeblocks/src/src/app.cpp:295: undefined reference to `Manager::GetConfigManager(wxString const&)'
/home/les/Documents/src/codeblocks/src/src/app.cpp:295: undefined reference to `ConfigManager::Write(wxString const&, int)'
/home/les/Documents/src/codeblocks/src/src/app.cpp:298: undefined reference to `Manager::GetConfigManager(wxString const&)'
/home/les/Documents/src/codeblocks/src/src/app.cpp:298: undefined reference to `ConfigManager::Write(wxString const&, int)'
{pages of undefined references follow}
Any ideas?
That looks like the libcodeblocks.a wasn't linked correctly.
After some time away doing other things I had another go. The problem is that it is trying to link to /usr/local/lib/libcodeblocks.so not src/sdk/.libs/libcodeblocks.so. /usr/local/lib/libcodeblocks.so is from RC2 so it does not have configmanager. As a workaround I went into src/sdk and did a make install. That seemed to solve the problem.
I don't know automake well enough to try actually fixing the problem.
Les