Menu

#647 Two trivial build errors

v0.5.1
closed-out-of-date
nobody
None
5
2015-05-31
2012-12-30
No

Non-critical build error. Solved by adding '#include <string.h>' in the beginning of quadsquare.cpp

/home/sh/src/vegastrike-src-0.5.1.r1/src/gfx/quadsquare.cpp: In member function ‘float quadsquare::GetHeight(const quadcornerdata&, float, float, Vector&)’:
/home/sh/src/vegastrike-src-0.5.1.r1/src/gfx/quadsquare.cpp:220:33: warning: suggest parentheses around arithmetic in operand of ‘^’ [-Wparentheses]
In file included from /home/sh/src/vegastrike-src-0.5.1.r1/src/gfx/quadsquare.h:18:0,
from /home/sh/src/vegastrike-src-0.5.1.r1/src/gfx/quadsquare.cpp:16:
/home/sh/src/vegastrike-src-0.5.1.r1/src/resizable.h: In instantiation of ‘Resizable<ITEM>::Resizable(const Resizable<ITEM>&) [with ITEM = unsigned int]’:
/home/sh/src/vegastrike-src-0.5.1.r1/src/gfx/quadsquare.h:71:8: required from ‘void std::vector<_Tp, _Alloc>::_M_insert_aux(std::vector<_Tp, _Alloc>::iterator, const _Tp&) [with _Tp = TextureIndex; _Alloc = std::allocator<TextureIndex>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<TextureIndex*, std::vector<TextureIndex> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = TextureIndex*]’
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/stl_vector.h:893:4: required from ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = TextureIndex; _Alloc = std::allocator<TextureIndex>; std::vector<_Tp, _Alloc>::value_type = TextureIndex]’
/home/sh/src/vegastrike-src-0.5.1.r1/src/gfx/quadsquare.cpp:351:47: required from here
/home/sh/src/vegastrike-src-0.5.1.r1/src/resizable.h:19:9: error: ‘memcpy’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
In file included from /home/sh/src/vegastrike-src-0.5.1.r1/src/pk3.h:42:0,
from /home/sh/src/vegastrike-src-0.5.1.r1/src/vsfilesystem.h:13,
from /home/sh/src/vegastrike-src-0.5.1.r1/src/gfx/vsimage.h:4,
from /home/sh/src/vegastrike-src-0.5.1.r1/src/gfx/aux_texture.h:23,
from /home/sh/src/vegastrike-src-0.5.1.r1/src/gfx/quadsquare.cpp:18:
/usr/include/string.h:42:14: note: ‘void* memcpy(void*, const void*, size_t)’ declared here, later in the translation unit
make[2]: *** [CMakeFiles/vegastrike.dir/src/gfx/quadsquare.o] Error 1
make[1]: *** [CMakeFiles/vegastrike.dir/all] Error 2
make: *** [all] Error 2

Discussion

  • Sergei Shilovsky

    One more trivial error. Solution is in the build log: "use ‘this->SetCurPosition’ instead"

    /home/sh/src/vegastrike-src-0.5.1.r1/src/cmd/unit_jump.h:111:29: error: ‘SetCurPosition’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
    /home/sh/src/vegastrike-src-0.5.1.r1/src/cmd/unit_jump.h:111:29: note: declarations in dependent base ‘Unit’ are not found by unqualified lookup
    /home/sh/src/vegastrike-src-0.5.1.r1/src/cmd/unit_jump.h:111:29: note: use ‘this->SetCurPosition’ instead
    In file included from /home/sh/src/vegastrike-src-0.5.1.r1/src/cmd/unit.cpp:59:0:
    /home/sh/src/vegastrike-src-0.5.1.r1/src/cmd/unit_physics.h: In instantiation of ‘void GameUnit<UnitType>::UpdatePhysics2(const Transformation&, const Transformation&, const Vector&, float, const Matrix&, const Vector&, bool, UnitCollection*) [with UnitType = Enhancement]’:
    /home/sh/src/vegastrike-src-0.5.1.r1/src/cmd/unit.cpp:744:16: required from here
    /home/sh/src/vegastrike-src-0.5.1.r1/src/cmd/unit_physics.h:107:16: warning: unused variable ‘blah’ [-Wunused-variable]
    /home/sh/src/vegastrike-src-0.5.1.r1/src/cmd/unit_physics.h:116:16: warning: unused variable ‘blah1’ [-Wunused-variable]
    /home/sh/src/vegastrike-src-0.5.1.r1/src/cmd/unit_physics.h:119:16: warning: unused variable ‘blah2’ [-Wunused-variable]
    make[2]: *** [CMakeFiles/vegastrike.dir/src/cmd/unit.o] Error 1
    make[1]: *** [CMakeFiles/vegastrike.dir/all] Error 2
    make: *** [all] Error 2

     
  • Sergei Shilovsky

    • summary: Build error --> Two trivial build errors
     
  • Klauss++

    Klauss++ - 2012-12-30

    Both appear fixed in SVN.

     
  • Klauss++

    Klauss++ - 2012-12-30
    • status: open --> closed-out-of-date
     
  • Anonymous

    Anonymous - 2015-04-12

    Dear Sergei,

    could you please be a little more precise regarding solution number 2.
    I have no idea how to solve this second mistake (I am an absolute noob)!

    Thanks in advance for any help.

     
  • Klauss++

    Klauss++ - 2015-04-13

    Means go to the sources, at src/cmd/unit_jump.h line 111, if you see a call SetCurPosition(...) without a this-> before it, change it to read this->SetCurPosition(...)

     
  • Anonymous

    Anonymous - 2015-05-31

    Have the latest /src/vegastrike-src-0.5.1.r1
    These errors are not fixed in the code, added the #include to the first file and added -> at line 111 in unit_jump.h
    Still get this...
    src/cmd/unit_jump.h: In member function ‘bool GameUnit<UnitType>::TransferUnitToSystem(unsigned int, StarSystem&, bool)’:
    src/cmd/unit_jump.h:111:29: error: expected primary-expression before ‘->’ token
    make[1]:
    ** [src/cmd/unit.o] Error 1

     

Anonymous
Anonymous

Add attachments
Cancel