Cuberite Forum

Full Version: AntiCheat
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Use Vector.Length.
My AntiCheat Source can't compiled on Linux.

Error:
Code:
Entities/libEntities.a(Player.cpp.o): In function `cPlayer::TossHeldItem(char)':
Player.cpp:(.text+0x45d4): Undefined reference to `cFastDropChecker::Check(cPlayer&)'
Entities/libEntities.a(Player.cpp.o): In function `cPlayer::TossEquippedItem(char)':
Player.cpp:(.text+0x48f8): Undefined reference to `cFastDropChecker::Check(cPlayer&)'

Code: https://github.com/daniel0916/MCServer/tree/AntiCheat
Looks like cFastDropChecker isn't included?
But it is included.

#include "../AntiCheat/FastDropChecker.h"
Is it added to the cmakelists.txt? (AFAIK that's where you need to add it, but ask tycho).
Youve got a glob so it should be included. Have you tried rerunning cmake?
(03-09-2014, 04:41 AM)worktycho Wrote: [ -> ]Youve got a glob so it should be included. Have you tried rerunning cmake?

What do you mean with rerun?
I'm using:
Code:
cmake -DCMAKE_BUILD_TYPE=RELEASE .. && make
from the COMPILING file.
Should i redownload the code and then try to compile it?

Edit: Redownload and compile make the same error.
It's a new folder, would that still be included in the glob?
I can't see anything wrong. Might need to have a play with it tomorrow.

He's added his folder to the folders list and added a CMakelist to the directory so it should all be set up.

Got It now. The problem is that you haven't added a library dependency between AntiCheat and Entities. I set the system up to compile each folder as a library to reduce link times. And Entities is being linked before anticheat so its missing relocations. To fix this you need to move AntiCheat before Entities in the folders list then add
Code:
target_link_libraries(Entities AntiCheat)
to the end of Entities.
Thanks for your help Smile. Now it's working.
https://github.com/daniel0916/MCServer/c...761d9107ca
Pages: 1 2 3