Mjmackan
Mapper ~ Writer
Heyo, trying to compile some sources, works fine in Windows but getting warnings in Linux which stops me from continueing.
TFS version 1.4.1 vc14
Sucessfull compiling on: Windows 10
Non successfull compile on: Linux Ubuntu 24.04.1
Some things I've ticked:
-The command Wno-dev wont do any.
-There's no such thing as 'Werror' in my CMakeFiles.
-Updated libraries.
-Reinstalled server.
-Makefile:91 contains line:
-Makefile2:102 contains line:
-build.make:109 contains line:
-Correcting the warnings will give me errors instead, the fuck?
TFS version 1.4.1 vc14
Sucessfull compiling on: Windows 10
Non successfull compile on: Linux Ubuntu 24.04.1
Some things I've ticked:
-The command Wno-dev wont do any.
-There's no such thing as 'Werror' in my CMakeFiles.
-Updated libraries.
-Reinstalled server.
-Makefile:91 contains line:
.PHONY : clean/fast
-Makefile2:102 contains line:
$(MAKE) $(MAKESILENT) -f CMakeFiles/tfs.dir/build.make CMakeFiles/tfs.dir/build
-build.make:109 contains line:
/usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -Winvalid-pch -include /home/otsmanager/forgottenserver/build/CMakeFiles/tfs.dir/cmake_pch.hxx -MD -MT CMakeFiles/tfs.dir/src/actions.cpp.o -MF CMakeFiles/tfs.dir/src/actions.cpp.o.d -o CMakeFiles/tfs.dir/src/actions.cpp.o -c /home/otsmanager/forgottenserver/src/actions.cpp
-Correcting the warnings will give me errors instead, the fuck?
Code:
CMake Warning (dev) at src/CMakeLists.txt:1 (set):
Cannot set "tfs_SRC": current scope has no parent.
Call Stack (most recent call first):
CMakeLists.txt:104 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring done (0.7s)
-- Generating done (0.0s)
-- Build files have been written to: /home/otsmanager/forgottenserver/build
otsmanager@gamefate:~/forgottenserver/build$ make
[ 1%] Building CXX object CMakeFiles/tfs.dir/cmake_pch.hxx.gch
[ 2%] Building CXX object CMakeFiles/tfs.dir/src/otpch.cpp.o
[ 3%] Building CXX object CMakeFiles/tfs.dir/src/actions.cpp.o
In file included from /home/otsmanager/forgottenserver/src/game.h:30,
from /home/otsmanager/forgottenserver/src/actions.cpp:26:
/home/otsmanager/forgottenserver/src/player.h: In member function ‘void Player::setAttackSpeed(uint32_t)’:
/home/otsmanager/forgottenserver/src/player.h:1351:38: error: unused parameter ‘speed’ [-Werror=unused-parameter]
1351 | void setAttackSpeed(uint32_t speed) {
| ~~~~~~~~~^~~~~
/home/otsmanager/forgottenserver/src/player.h: In member function ‘uint32_t Player::getAttackSpeed() const’:
/home/otsmanager/forgottenserver/src/player.h:1362:30: error: suggest parentheses around ‘&&’ within ‘||’ [-Werror=parentheses]
1362 | if (attackSpeed <= 0 && !weapon || attackSpeed <= 0 && weapon->getAttackSpeed() == 0) {
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~
In file included from /home/otsmanager/forgottenserver/src/actions.cpp:28:
/home/otsmanager/forgottenserver/src/spells.h: At global scope:
/home/otsmanager/forgottenserver/src/spells.h:205:17: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
205 | const SpellGroup_t getGroup() const {
| ^~~~~
/home/otsmanager/forgottenserver/src/spells.h:211:17: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
211 | const SpellGroup_t getSecondaryGroup() const {
| ^~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/tfs.dir/build.make:109: CMakeFiles/tfs.dir/src/actions.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:102: CMakeFiles/tfs.dir/all] Error 2
make: *** [Makefile:91: all] Error 2