jxsl13 / zcatch

zCatch is a server modification for the retro multiplayer shooter Teeworlds. It is a last man standing instagib gamemode.
https://zcat.ch
Other
15 stars 5 forks source link

Build fails do to instantiation of an abstract class #96

Closed vtronko closed 4 years ago

vtronko commented 4 years ago

Some methods implementations were removed and now the whole thing is not building. Here's

[ 64%] Building CXX object CMakeFiles/teeworlds.dir/src/engine/client/input.cpp.o
/home/arch/zcatch/src/engine/client/input.cpp: In function ‘IEngineInput* CreateEngineInput()’:
/home/arch/zcatch/src/engine/client/input.cpp:383:48: error: invalid new-expression of abstract class type ‘CInput’
  383 | IEngineInput *CreateEngineInput() { return new CInput; }
      |                                                ^~~~~~
In file included from /home/arch/zcatch/src/engine/client/input.cpp:12:
/home/arch/zcatch/src/engine/client/input.h:6:7: note:   because the following virtual functions are pure within ‘CInput’:
    6 | class CInput : public IEngineInput
      |       ^~~~~~
In file included from /home/arch/zcatch/src/engine/client/input.cpp:9:
/home/arch/zcatch/src/engine/input.h:64:14: note:     ‘virtual int IInput::NumJoysticks() const’
   64 |  virtual int NumJoysticks() const = 0;
      |              ^~~~~~~~~~~~
/home/arch/zcatch/src/engine/input.h:65:14: note:     ‘virtual int IInput::GetJoystickIndex() const’
   65 |  virtual int GetJoystickIndex() const = 0;
      |              ^~~~~~~~~~~~~~~~
/home/arch/zcatch/src/engine/input.h:66:15: note:     ‘virtual void IInput::SelectNextJoystick()’
   66 |  virtual void SelectNextJoystick() = 0;
      |               ^~~~~~~~~~~~~~~~~~
/home/arch/zcatch/src/engine/input.h:67:22: note:     ‘virtual const char* IInput::GetJoystickName()’
   67 |  virtual const char* GetJoystickName() = 0;
      |                      ^~~~~~~~~~~~~~~
/home/arch/zcatch/src/engine/input.h:68:14: note:     ‘virtual int IInput::GetJoystickNumAxes()’
   68 |  virtual int GetJoystickNumAxes() = 0;
      |              ^~~~~~~~~~~~~~~~~~
/home/arch/zcatch/src/engine/input.h:69:16: note:     ‘virtual float IInput::GetJoystickAxisValue(int)’
   69 |  virtual float GetJoystickAxisValue(int Axis) = 0;
      |                ^~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/teeworlds.dir/build.make:148: CMakeFiles/teeworlds.dir/src/engine/client/input.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:606: CMakeFiles/teeworlds.dir/all] Error 2
make: *** [Makefile:171: all] Error 2
jxsl13 commented 4 years ago

you need to disable the client build, as this is a server side modification.

jxsl13 commented 4 years ago

https://github.com/jxsl13/zcatch/blob/ba80e65b96b31ee957364d09ee81ce7f2ac7a030/.github/workflows/build.yaml#L54

jxsl13 commented 4 years ago

-DCLIENT=OFF

https://github.com/jxsl13/zcatch/issues/89 :D