Code::Blocks Forums

User forums => Help => Topic started by: connyosis on November 03, 2005, 04:14:40 pm

Title: Error during cvs compilation
Post by: connyosis on November 03, 2005, 04:14:40 pm
Downloaded the latest cvs of code::blocks and started a compile under Gentoo Linux.
After a while, it quits with these errors:

g++ -DHAVE_CONFIG_H -I. -I. -I. -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -I../../src/sdk/wxscintilla/include -I../../src/sdk/tinyxml -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -g -O2 -O2 -ffast-math -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -MT macrosmanager.lo -MD -MP -MF .deps/macrosmanager.Tpo -c macrosmanager.cpp  -fPIC -DPIC -o .libs/macrosmanager.o
macrosmanager.cpp: In static member function `static void MacrosManager::Free()
   ':
macrosmanager.cpp:59: error: incomplete type 'UserVariableManager' cannot be
   used to name a scope
macrosmanager.cpp: In member function `void
   MacrosManager::ReplaceMacros(wxString&, bool)':
macrosmanager.cpp:144: error: `Replace' undeclared (first use this function)
macrosmanager.cpp:144: error: (Each undeclared identifier is reported only once
   for each function it appears in.)
macrosmanager.cpp:154: error: `ConfigManager' undeclared (first use this
   function)
macrosmanager.cpp:154: error: syntax error before `::' token
macrosmanager.cpp:163: error: syntax error before `)' token
macrosmanager.cpp:167: error: syntax error before `else'
macrosmanager.cpp:171: error: syntax error before `)' token
macrosmanager.cpp:174: error: `target' undeclared (first use this function)
macrosmanager.cpp: At global scope:
macrosmanager.cpp:184: error: `pre' was not declared in this scope
macrosmanager.cpp:184: error: `env' was not declared in this scope
macrosmanager.cpp:184: error: `post' was not declared in this scope
macrosmanager.cpp:186: error: syntax error before `if'
macrosmanager.cpp:196: error: `env' was not declared in this scope
macrosmanager.cpp:196: error: `envactual' was not declared in this scope
macrosmanager.cpp:196: error: ISO C++ forbids declaration of `wxGetEnv' with no
   type
macrosmanager.cpp:196: error: `int wxGetEnv' redeclared as different kind of
   symbol
/usr/include/wx-2.6/wx/utils.h:343: error: previous declaration of `bool
   wxGetEnv(const wxString&, wxString*)'
macrosmanager.cpp:196: error: initializer list being treated as compound
   expression
macrosmanager.cpp:198: error: syntax error before `.' token
make[4]: *** [macrosmanager.lo] Error 1
make[4]: Leaving directory `/home/conny/Desktop/projekt/codeblocks/src/sdk'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/conny/Desktop/projekt/codeblocks/src/sdk'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/conny/Desktop/projekt/codeblocks/src/sdk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/conny/Desktop/projekt/codeblocks/src'
make: *** [all-recursive] Error 1
conny@abbey ~/Desktop/projekt/codeblocks $   

Including uservarmanager.h & configmanager.h in sdk/macrosmanager.cpp, and including uservarmanager.h in sdk/manager.cpp fixed the problem for me.

   
Title: Re: Error during cvs compilation
Post by: yop on November 04, 2005, 01:08:00 am
You tried to build codeblocks using the unix cbp? It seems that it's kind of outdated I am afraid. I had similar problems, use automake instead.
Title: Re: Error during cvs compilation
Post by: connyosis on November 04, 2005, 01:53:04 am
No, I downloaded the cvs version, bootstrapped it and ran configure && make
Got the error a while into the compilation, so I added a few includes and it compiled fine.
Title: Re: Error during cvs compilation
Post by: TheTuxKeeper on November 05, 2005, 01:42:09 pm
I get the same error but only with wxGTK 2.5.x, 2.6.1 works fine

I'll test connyosis modifications.

EDIT:
It works !!!
Thank you connyosis
Title: Re: Error during cvs compilation
Post by: connyosis on November 05, 2005, 06:51:20 pm
Anytime :-)
Glad it worked for you.
Title: Re: Error during cvs compilation
Post by: rudin on November 10, 2005, 04:50:57 pm
Connyosis, it works for me too (wxGTK 2.6.2). Thanks.
Somebody should patch the files on CVS repository.

-
rudin
Title: Re: Error during cvs compilation
Post by: Bloop on November 11, 2005, 10:11:40 am
Hey Guys

Exactly what have you done to compile the CVS right?

What do you mean with using the unix cbp ?

Regards Bloop
Title: Re: Error during cvs compilation
Post by: connyosis on November 11, 2005, 04:02:45 pm
Download the latest cvs version of code::blocks.
In codeblocks/src/sdk/macrosmanager.cpp, add two lines #include "uservarmanager.h" and #include "configmanager.h" with the other include lines.
In codeblocks/src/sdk/manager.cpp, add #include "uservarmanager.h".

Now bootstrap and configure && make && make install

(I haven't tested the latest cvs, maybe this problem has been fixed now. If not, try this)