rschurade / Ingnomia

GNU Affero General Public License v3.0
240 stars 47 forks source link

GCC fails to compile TypePropertyUtil.h #114

Closed Sedrowow closed 3 years ago

Sedrowow commented 3 years ago

if i do cmake --build on the build directory i made i get following error: /home/sedrowow/Dokumente/GAMES/nolol/Include/NsCore/TypePropertyUtil.h: In Funktion »Noesis::Ptr<Noesis::BaseComponent> Noesis::GetComponent(const Noesis::TypeProperty*, const void*, Noesis::NonRefCountedType)«: /home/sedrowow/Dokumente/GAMES/nolol/Include/NsCore/TypePropertyUtil.h:34:35: Fehler: expected primary-expression before »>« token 34 | return Boxing::Box(prop->Get<T>(ptr)); | ^ /home/sedrowow/Dokumente/GAMES/nolol/Include/NsCore/TypePropertyUtil.h: In Funktion »Noesis::Ptr<Noesis::BaseComponent> Noesis::GetComponent(const Noesis::TypeProperty*, const void*, Noesis::PtrRefCountedType)«: /home/sedrowow/Dokumente/GAMES/nolol/Include/NsCore/TypePropertyUtil.h:40:53: Fehler: expected primary-expression before »>« token 40 | return DynamicPtrCast<BaseComponent>(prop->Get<T>(ptr)); | ^ /home/sedrowow/Dokumente/GAMES/nolol/Include/NsCore/TypePropertyUtil.h: In Funktion »Noesis::Ptr<Noesis::BaseComponent> Noesis::GetComponent(const Noesis::TypeProperty*, const void*, Noesis::PointerRefCountedType)«: /home/sedrowow/Dokumente/GAMES/nolol/Include/NsCore/TypePropertyUtil.h:46:30: Fehler: expected primary-expression before »(« token 46 | return Ptr<BaseComponent>(const_cast<BaseComponent*>( | ^ /home/sedrowow/Dokumente/GAMES/nolol/Include/NsCore/TypePropertyUtil.h:47:54: Fehler: expected primary-expression before »>« token 47 | DynamicCast<const BaseComponent*>(prop->Get<T>(ptr)))); | ^ /home/sedrowow/Dokumente/GAMES/nolol/Include/NsCore/TypePropertyUtil.h: In Funktion »void Noesis::SetComponent(const Noesis::TypeProperty*, void*, Noesis::BaseComponent*, Noesis::NonCharPointerType)«: /home/sedrowow/Dokumente/GAMES/nolol/Include/NsCore/TypePropertyUtil.h:66:16: Fehler: expected primary-expression before »>« token 66 | prop->Set<T>(ptr, value != 0 ? Boxing::Unbox<T>(value) : T()); | ^ /home/sedrowow/Dokumente/GAMES/nolol/Include/NsCore/TypePropertyUtil.h: In Funktion »void Noesis::SetComponent(const Noesis::TypeProperty*, void*, Noesis::BaseComponent*, Noesis::CharPointerType)«: /home/sedrowow/Dokumente/GAMES/nolol/Include/NsCore/TypePropertyUtil.h:72:16: Fehler: expected primary-expression before »>« token 72 | prop->Set<T>(ptr, value != 0 ? Boxing::Unbox<String>(value).Str() : ""); | ^ /home/sedrowow/Dokumente/GAMES/nolol/Include/NsCore/TypePropertyUtil.h: In Funktion »void Noesis::SetComponent(const Noesis::TypeProperty*, void*, Noesis::BaseComponent*, Noesis::PtrRefCountedType)«: /home/sedrowow/Dokumente/GAMES/nolol/Include/NsCore/TypePropertyUtil.h:84:16: Fehler: expected primary-expression before »>« token 84 | prop->Set<T>(ptr, T(DynamicCast<typename T::Type*>(value))); | ^ /home/sedrowow/Dokumente/GAMES/nolol/Include/NsCore/TypePropertyUtil.h: In Funktion »void Noesis::SetComponent(const Noesis::TypeProperty*, void*, Noesis::BaseComponent*, Noesis::PointerRefCountedType)«: /home/sedrowow/Dokumente/GAMES/nolol/Include/NsCore/TypePropertyUtil.h:90:16: Fehler: expected primary-expression before »>« token 90 | prop->Set<T>(ptr, DynamicCast<T>(value)); | ^ make[2]: *** [3rdparty/NoesisApp/CMakeFiles/NoesisApp.dir/build.make:271: 3rdparty/NoesisApp/CMakeFiles/NoesisApp.dir/cmake_pch.hxx.gch] Fehler 1 make[1]: *** [CMakeFiles/Makefile2:331: 3rdparty/NoesisApp/CMakeFiles/NoesisApp.dir/all] Fehler 2

I will appreciate any help ^^

Ext3h commented 3 years ago

https://www.noesisengine.com/bugs/view.php?id=1843

Take the patched header from there. Will be fixed in the next Noesis release. Only effects recent gcc versions.

Sedrowow commented 3 years ago

ok... so i need the "TypePropertyUtil".h file right? if yes how do i use it? (sorry but i am a bit "unexperienced" about this) and big thanks for the fast reply

i think i got it, do i have to replace a file?

Sedrowow commented 3 years ago

i replaced the file "include/NsCore/TypePropertyUtil.h" with the one you sent me in the link. It seems to work now (still building it)

Sedrowow commented 3 years ago

it worked thanks

Ext3h commented 3 years ago

Noesis 3.0.8 has been released. Is this issue resolved with that version?