16.11.2016, 08:35
Any ideas how to fix these errors in Linux with C++11 option? Templates are out of my knownledge.
https://github.com/kurta999/YSF/blob.../BitStream.cpp
https://github.com/kurta999/YSF/blob.../BitStream.cpp
Код:
rm -f *~ *.o *.so
g++ -m32 -std=c++11 -Ilib -DSAMPGDK_AMALGAMATION -fno-stack-protector -D YSF -c -O3 -fpack-struct=1 -fPIC -w -DLINUX ./lib/sdk/*.cpp
g++ -m32 -std=c++11 -Ilib -DSAMPGDK_AMALGAMATION -fno-stack-protector -D YSF -c -O3 -fpack-struct=1 -fPIC -w -DLINUX ./lib/raknet/*.cpp
In file included from ./lib/raknet/BitStream.cpp:17:0:
./lib/raknet/BitStream.h: In member function ‘bool RakNet::BitStream::ReadNormVector(templateType&, templateType&, templateType&)’:
./lib/raknet/BitStream.h:1200:28: error: no matching function for call to ‘RakNet::BitStream::ReadCompressed(float)’
ReadCompressed((float)cy);
^
./lib/raknet/BitStream.h:1200:28: note: candidates are:
./lib/raknet/BitStream.h:1024:15: note: bool RakNet::BitStream::ReadCompressed(templateType&) [with templateType = float]
inline bool BitStream::ReadCompressed(float &var)
^
./lib/raknet/BitStream.h:1024:15: note: no known conversion for argument 1 from ‘float’ to ‘float&’
./lib/raknet/BitStream.h:581:8: note: bool RakNet::BitStream::ReadCompressed(unsigned char*, int, bool)
bool ReadCompressed( unsigned char* output, const int size, const bool unsignedData );
^
./lib/raknet/BitStream.h:581:8: note: candidate expects 3 arguments, 1 provided
./lib/raknet/BitStream.h:1217:33: error: no matching function for call to ‘RakNet::BitStream::ReadCompressed(float)’
if (!ReadCompressed((float)cz))
^
./lib/raknet/BitStream.h:1217:33: note: candidates are:
./lib/raknet/BitStream.h:1024:15: note: bool RakNet::BitStream::ReadCompressed(templateType&) [with templateType = float]
inline bool BitStream::ReadCompressed(float &var)
^
./lib/raknet/BitStream.h:1024:15: note: no known conversion for argument 1 from ‘float’ to ‘float&’
./lib/raknet/BitStream.h:581:8: note: bool RakNet::BitStream::ReadCompressed(unsigned char*, int, bool)
bool ReadCompressed( unsigned char* output, const int size, const bool unsignedData );
^
./lib/raknet/BitStream.h:581:8: note: candidate expects 3 arguments, 1 provided
make: *** [YSF] Error 1

