Endless-sky: Compile error with latest build

Created on 2 Jun 2017  路  3Comments  路  Source: endless-sky/endless-sky

||=== Build: Debug in EndlessSky (compiler: GNU GCC Compiler) ===|
C:\Users\jon\Documents\GitHub\endless-sky-vanilla\source\Fleet.cpp||In member function 'void Fleet::Load(const DataNode&)':|
C:\Users\jon\Documents\GitHub\endless-sky-vanilla\source\Fleet.cpp|91|error: no matching function for call to 'std::vector<Fleet::Variant>::erase(std::vector<Fleet::Variant>::const_iterator&)'|
C:\Users\jon\Documents\GitHub\endless-sky-vanilla\source\Fleet.cpp|91|note: candidates are:|
C:\Program Files\mingw64\x86_64-w64-mingw32\include\c++\bits\vector.tcc|134|note: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(std::vector<_Tp, _Alloc>::iterator) [with _Tp = Fleet::Variant; _Alloc = std::allocator<Fleet::Variant>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<Fleet::Variant*, std::vector<Fleet::Variant> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = Fleet::Variant*]|
C:\Program Files\mingw64\x86_64-w64-mingw32\include\c++\bits\vector.tcc|134|note:   no known conversion for argument 1 from 'std::vector<Fleet::Variant>::const_iterator {aka __gnu_cxx::__normal_iterator<const Fleet::Variant*, std::vector<Fleet::Variant> >}' to 'std::vector<Fleet::Variant>::iterator {aka __gnu_cxx::__normal_iterator<Fleet::Variant*, std::vector<Fleet::Variant> >}'|
C:\Program Files\mingw64\x86_64-w64-mingw32\include\c++\bits\vector.tcc|146|note: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(std::vector<_Tp, _Alloc>::iterator, std::vector<_Tp, _Alloc>::iterator) [with _Tp = Fleet::Variant; _Alloc = std::allocator<Fleet::Variant>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<Fleet::Variant*, std::vector<Fleet::Variant> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = Fleet::Variant*]|
C:\Program Files\mingw64\x86_64-w64-mingw32\include\c++\bits\vector.tcc|146|note:   candidate expects 2 arguments, 1 provided|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

@tehhowch tells me that his is building fine, and given that I'm on Windows 10 and he's on Ubuntu 16.04, it may be OS specific.

bug

Most helpful comment

52f5ac0 should fix that.

All 3 comments

How are you compiling? I'm on Ubuntu, yes, and I'm using scons to compile. My gcc -v output:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 

52f5ac0 should fix that.

Works now. Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MessyMix picture MessyMix  路  3Comments

jafdy picture jafdy  路  3Comments

Bladewood picture Bladewood  路  3Comments

Pointedstick picture Pointedstick  路  3Comments

Lorantine picture Lorantine  路  3Comments