Doesn't compile with GCC

Jeko

17-05-2009 09:55:40

Hi,

I'm trying to compile svn, to access the highly useful C# wrapper :-)

However, there are compilation problems... I'm using GCC version 4.2.4.

1- There is no such std::exception constructor which takes string as a parameter (maybe visual decided it does, but doing so, it should not have called his exception "std")

Quick fix:
MyGUIEngine/include/MyGUI_Diagnostic.h
-#define MYGUI_BASE_EXCEPT(desc, src) throw std::exception(desc);
+#define MYGUI_BASE_EXCEPT(desc, src) throw std::runtime_error(desc);


2- MYGUI_C_MULTI_DELEGATE macro doesn't compile.

/usr/include/c++/4.2/bits/stl_list.h: In constructor ‘std::_List_base<_Tp, _Alloc>::_List_base(const _Alloc&) [with _Tp = MyGUI::delegates::IDelegate0*, _Alloc = MyGUI::Allocator<MyGUI::delegates::IDelegate0*>]’:
/usr/include/c++/4.2/bits/stl_list.h:473: instantiated from ‘std::list<_Tp, _Alloc>::list(const _Alloc&) [with _Tp = MyGUI::delegates::IDelegate0*, _Alloc = MyGUI::Allocator<MyGUI::delegates::IDelegate0*>]’
../../MyGUIEngine/include/MyGUI_DelegateImplement.h:188: instantiated from here
/usr/include/c++/4.2/bits/stl_list.h:343: error: no matching function for call to ‘std::_List_base<MyGUI::delegates::IDelegate0*, MyGUI::Allocator<MyGUI::delegates::IDelegate0*> >::_List_impl::_List_impl(const MyGUI::Allocator<MyGUI::delegates::IDelegate0*>&)’
/usr/include/c++/4.2/bits/stl_list.h:308: note: candidates are: std::_List_base<_Tp, _Alloc>::_List_impl::_List_impl(const typename _Alloc::rebind<std::_List_node<_Tp> >::other&) [with _Tp = MyGUI::delegates::IDelegate0*, _Alloc = MyGUI::Allocator<MyGUI::delegates::IDelegate0*>]
/usr/include/c++/4.2/bits/stl_list.h:305: note: std::_List_base<MyGUI::delegates::IDelegate0*, MyGUI::Allocator<MyGUI::delegates::IDelegate0*> >::_List_impl::_List_impl(const std::_List_base<MyGUI::delegates::IDelegate0*, MyGUI::Allocator<MyGUI::delegates::IDelegate0*> >::_List_impl&)
make[2]: *** [MyGUI_ActionController.lo] Error 1


Cryptic isn't it... Well, this part of code (MyGUI_DelegateImplement.h) is quite an hell made of macros and templates, I looked quickly how to fix but couldn't figure out, hope you can help with this.

Thank you,

Jeko

Altren

17-05-2009 10:36:08

Well, actually right now linux build system is broken (those two errors fixed, but not commited yet). I suggest you use revision not higher than 1900.
If you want to use C# wrapper you should use MyGUI 2.2.2 or wait until we generate it again (it won't happen soon because we busy with some other thing that won't let us do it).