Hi everyone,
I hope this is the correct board for my question. After I update my SDK with the latest version and set GCC 11.2.0 as default I get weird errors when compiling my project.
Sometimes (not always) it throws errors for not finding <iostream> in one class - but in all other classes it compiles normally including <iostream>. This error happens occasiionally and it always refers to a different class.
If these errors are not happening then it complains about near endless errors regarding things like:
(.text._ZN12_GLOBAL__N_14pool4freeEPv.constprop.0+0x58): undefined reference to __gthread_active_p'
ld: Dwarf Error: found dwarf version '0', this reader only handles version 2, 3 and 4 information
but this also does not happen everytime.
I added -gstabs to my CFLAGS as well as -fno-threadsafe-statics - but no change.
It is really acting randomly and incomprehensible. Any idea what might be wrong here? Is the 11.2.0 version within the SDK instable? So far I used GCC 2.4.3 (IIRC) from the previous SDK. That one compiled everything fine without any problems. I got the hint to use -lpthread but that did not work either.
I meanwhile tested all versions of GCC which are in the latest SDK. The only one which does not throw such errors is 6.4.0 - but that one throws different errors:
src/WizardGroundsC.cc:200: undefined reference to `std::__throw_bad_array_new_length()' o/WindowC.o: In function `std::_Rb_tree_iterator<std::pair<int const, GadgetC*> >&& std::forward<std::_Rb_tree_iterator<std::pair<int const, GadgetC*> > >(std::remove_reference<std::_Rb_tree_iterator<std::pair<int const, GadgetC*> > >::type&)': /DH1/Prog/SDK/gcc/include/c++/11.2.0/bits/stl_pair.h:(.text._ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP7GadgetCEEE8allocateEjPKv[_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP7GadgetCEEE8allocateEjPKv]+0x68): undefined reference to `std::__throw_bad_array_new_length()' o/PlayerC.o: In function `std::vector<BuildingC*, std::allocator<BuildingC*> >::end()': /DH1/Prog/SDK/gcc/include/c++/11.2.0/bits/alloc_traits.h:(.text._ZN9__gnu_cxx13new_allocatorIP9BuildingCE8allocateEjPKv[_ZN9__gnu_cxx13new_allocatorIP9BuildingCE8allocateEjPKv]+0x64): undefined reference to `std::__throw_bad_array_new_length()' o/PlayerManagerC.o: In function `PlayerManagerC::~PlayerManagerC()': src/PlayerManagerC.cc:9: undefined reference to `std::__throw_bad_array_new_length()' o/MenusC.o: In function `MenusC::~MenusC()': src/MenusC.cc:10: undefined reference to `std::__throw_bad_array_new_length()' o/MenusC.o:src/MenusC.cc:67: more undefined references to `std::__throw_bad_array_new_length()' follow make: *** [bin/WizardGrounds] Error 1
Maybe I stick with that version and try to fix things. But as said version 2.4.3 did compile everything fine.
No clue what I still can try to get one of the later GCC versions working.
Thank you in advance for your help.