with typedef get was not declared in this scope

I'm trying to build on FreeBSD but it fails:

guichan/basiccontainer.cpp: In member function 'virtual void gcn::BasicContainer::focusNext()':
guichan/basiccontainer.cpp:114: error: 'WidgetListConstIterator' was not declared in this scope
guichan/basiccontainer.cpp:114: error: expected `;' before 'it'
guichan/basiccontainer.cpp:116: error: 'it' was not declared in this scope
guichan/basiccontainer.cpp:122: error: expected `;' before 'end'
guichan/basiccontainer.cpp:129: error: 'end' was not declared in this scope
guichan/basiccontainer.cpp: In member function 'virtual void gcn::BasicContainer::_setFocusHandler(gcn::FocusHandler*)':
guichan/basiccontainer.cpp:207: error: 'WidgetListConstIterator' was not declared in this scope
guichan/basiccontainer.cpp:207: error: expected `;' before 'iter'
guichan/basiccontainer.cpp:208: error: 'iter' was not declared in this scope
guichan/basiccontainer.cpp: In member function 'virtual void gcn::BasicContainer::clear()':
guichan/basiccontainer.cpp:247: error: 'WidgetListConstIterator' was not declared in this scope
guichan/basiccontainer.cpp:247: error: expected `;' before 'iter'
guichan/basiccontainer.cpp:248: error: 'iter' was not declared in this scope
guichan/basiccontainer.cpp: In member function 'virtual void gcn::BasicContainer::drawChildren(gcn::Graphics*)':
guichan/basiccontainer.cpp:264: error: 'WidgetListConstIterator' was not declared in this scope
guichan/basiccontainer.cpp:264: error: expected `;' before 'iter'
guichan/basiccontainer.cpp:265: error: 'iter' was not declared in this scope
guichan/basiccontainer.cpp: In member function 'virtual void gcn::BasicContainer::logicChildren()':
guichan/basiccontainer.cpp:303: error: 'WidgetListConstIterator' was not declared in this scope
guichan/basiccontainer.cpp:303: error: expected `;' before 'iter'
guichan/basiccontainer.cpp:304: error: 'iter' was not declared in this scope
guichan/basiccontainer.cpp: In member function 'void gcn::BasicContainer::setInternalFocusHandler(gcn::FocusHandler*)':
guichan/basiccontainer.cpp:341: error: 'WidgetListConstIterator' was not declared in this scope
guichan/basiccontainer.cpp:341: error: expected `;' before 'iter'
guichan/basiccontainer.cpp:342: error: 'iter' was not declared in this scope
guichan/basiccontainer.cpp: In member function 'virtual gcn::Widget* gcn::BasicContainer::findWidgetById(const std::string&)':
guichan/basiccontainer.cpp:353: error: 'WidgetListConstIterator' was not declared in this scope
guichan/basiccontainer.cpp:353: error: expected `;' before 'iter'
guichan/basiccontainer.cpp:354: error: 'iter' was not declared in this scope


WidgetListConstIterator is a typedef of WidgetList that's a typedef of vector<Widget *>
and it's included correct, when i replace WidgetListConstIterator with std::vector<Widget *>::const_iterator the error disappears.

Q: why it's "was not declared in this scope" ? if it's defined in basiccontainer.hpp ?

these two files can be found here (I'm not author):
http://www.gitorious.org/manaplus/manaplus/blobs/master/src/guichan/basiccontainer.cpp
http://www.gitorious.org/manaplus/manaplus/blobs/master/src/guichan/include/guichan/basiccontainer.hpp

compiler: g++; with clang compiler get same error plus other about = operator
Last edited on
hello,
probably you mixed system guichan headers and embeded guichan code.
It can be issue in configure script.

You can fix configure/make to include headers from manaplus/src/guichan/include
or you can disable embeded guichan by configure flag:
./configure --without-internalguichan

also better join #manaplus on freenode for other support
You're right!

% find /usr/local/include/ -name "*guichan*"
/usr/local/include/guichan.hpp
/usr/local/include/guichan

and
 
... -I/usr/local/include ...

generated by configure script.

thank you!

akaras, developer of manaplaus, right ?

joining on the IRC channel and marking as solved ...
Topic archived. No new replies allowed.