Author Topic: Buidling from CVS Error  (Read 8053 times)

Offline parasito

  • Multiple posting newcomer
  • *
  • Posts: 11
    • www.tecnolibre.org
Buidling from CVS Error
« on: November 22, 2005, 01:03:27 am »
Hi all!!

I'm building codeblocks from CVS in Debian Sid following wiki Compiling Code::Blocks in Linux  instructions.

I have the following error:

Code: [Select]
./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!
« Last Edit: November 22, 2005, 01:23:45 am by parasito »

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Re: Buidling from CVS Error
« Reply #1 on: November 22, 2005, 03:02:58 am »
For the first error (configmanager.h:198) you can change the line to:

Code: [Select]
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?

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: Buidling from CVS Error
« Reply #2 on: November 22, 2005, 03:18:20 am »
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.

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Re: Buidling from CVS Error
« Reply #3 on: November 22, 2005, 03:36:21 am »
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.

Offline parasito

  • Multiple posting newcomer
  • *
  • Posts: 11
    • www.tecnolibre.org
Re: Buidling from CVS Error
« Reply #4 on: November 22, 2005, 09:20:55 am »
I have made both changes, but I still have the same error  :(

Code: [Select]
./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

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Re: Buidling from CVS Error
« Reply #5 on: November 23, 2005, 09:09:19 am »
Try including "base64.h" in configmanager.h.

Offline parasito

  • Multiple posting newcomer
  • *
  • Posts: 11
    • www.tecnolibre.org
Re: Buidling from CVS Error
« Reply #6 on: November 23, 2005, 11:39:11 am »
That works!

But I have another error

Code: [Select]
./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

Offline Der Meister

  • Regular
  • ***
  • Posts: 307
Re: Buidling from CVS Error
« Reply #7 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.
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.

Offline parasito

  • Multiple posting newcomer
  • *
  • Posts: 11
    • www.tecnolibre.org
Re: Buidling from CVS Error
« Reply #8 on: November 24, 2005, 01:21:50 am »
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 :-(

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: Buidling from CVS Error
« Reply #9 on: November 24, 2005, 02:41:20 am »
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

Offline lesnewell

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Buidling from CVS Error
« Reply #10 on: November 24, 2005, 11:42:01 am »
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?

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Buidling from CVS Error
« Reply #11 on: November 24, 2005, 06:41:38 pm »
That looks like the libcodeblocks.a wasn't linked correctly.

Offline lesnewell

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Buidling from CVS Error
« Reply #12 on: December 01, 2005, 01:48:17 pm »
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