Closed Exarkuniv closed 3 years ago
This looks like a compiler version issue. You could try adding -fpermissive
to CXXFLAGS to work around the problem.
@hifi what version should i have. i know on a Pi4 we are limited but sometimes people have found ways to get the newer versions on it
also where do i add -fpermissive
sorry im not any good with progamming, i can just manage how to compile things. the rest are above me
If I recall correctly you can do it something like this:
CXXFLAGS=-fpermissive cmake ..
when you run cmake.
And we don't really require recent gcc but the permissive stuff has changed over the years. It may be the other way around that your gcc is newer than what our CI is using.
thank you for that. ill let you know how it goes
Update that did it. i was able to build it perfectly. thank you
Thanks for help @hifi, with CXXFLAGS=-fpermissive cmake .. command, I was able to compile it even on RPi 3B+.
+1ing here, on Devuan 3 (Beowulf) with gcc 8.3 and the same error. Presumably this is bad code that needs to be made standards-conformant? But the -fpermissive workaround works here, although it does not work if you also specify CMAKE build type 'Release'.
been trying to build this on my Pi4 4gb im running Buster OS
i have g++ cmake libsdl2-dev libopenal-dev installed
i use this to set up the building mkdir build cd build cmake .. make
and i get this
[ 60%] Linking CXX executable ../vanillatd [ 60%] Built target VanillaTD [ 60%] Building CXX object redalert/CMakeFiles/VanillaRA.dir/_wsproto.cpp.o [ 60%] Building CXX object redalert/CMakeFiles/VanillaRA.dir/aadata.cpp.o In file included from /home/pi/Vanilla-Conquer/redalert/function.h:85, from /home/pi/Vanilla-Conquer/redalert/aadata.cpp:50: /home/pi/Vanilla-Conquer/redalert/heap.h: In instantiation of ‘T TFixedIHeapClass::Ptr(int) const [with T = AircraftTypeClass]’:
/home/pi/Vanilla-Conquer/redalert/aadata.cpp:639:40: required from here
/home/pi/Vanilla-Conquer/redalert/heap.h:246:16: error: passing ‘const DynamicVectorClass<void >’ as ‘this’ argument discards qualifiers [-fpermissive]
return (T)FixedIHeapClass::ActivePointers[index];
In file included from /home/pi/Vanilla-Conquer/redalert/heap.h:38,
from /home/pi/Vanilla-Conquer/redalert/function.h:85,
from /home/pi/Vanilla-Conquer/redalert/aadata.cpp:50:
/home/pi/Vanilla-Conquer/common/./vector.h:79:8: note: in call to ‘T& VectorClass::operator[](unsigned int) [with T = void ]’
T& operator[](unsigned index)
^
~~~ make[2]: [redalert/CMakeFiles/VanillaRA.dir/build.make:76: redalert/CMakeFiles/VanillaRA.dir/aadata.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:250: redalert/CMakeFiles/VanillaRA.dir/all] Error 2 make: *** [Makefile:84: all] Error 2not sure whats going on,