AntiCheat
#11
Use Vector.Length.
Reply
Thanks given by: daniel0916
#12
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
Reply
Thanks given by:
#13
Looks like cFastDropChecker isn't included?
Reply
Thanks given by:
#14
But it is included.

#include "../AntiCheat/FastDropChecker.h"
Reply
Thanks given by:
#15
Is it added to the cmakelists.txt? (AFAIK that's where you need to add it, but ask tycho).
Reply
Thanks given by:
#16
Youve got a glob so it should be included. Have you tried rerunning cmake?
Reply
Thanks given by:
#17
(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.
Reply
Thanks given by:
#18
It's a new folder, would that still be included in the glob?
Reply
Thanks given by:
#19
I can't see anything wrong. Might need to have a play with it tomorrow.

@bearbin 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.
Reply
Thanks given by: daniel0916
#20
Thanks for your help Smile. Now it's working.
https://github.com/daniel0916/MCServer/c...761d9107ca
Reply
Thanks given by:




Users browsing this thread: 4 Guest(s)