• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Linux Compiling error The Forgotten Server 0.3.6 (Crying Damson) V5

Thundercraft

New Member
Joined
Dec 5, 2010
Messages
67
Reaction score
0
Hey guys,

I'm trying to compile tfs with the source in this thread: http://otland.net/f18/8-60-forgotten-server-0-3-6-crying-damson-v5-147913/ but I keep getting this error..

Code:
otserv.cpp: In function 'void allocationHandler()':
otserv.cpp:232: warning: ignoring return value of 'char* fgets(char*, int, FILE*)', declared with attribute warn_unused_result
otserv.cpp: In function 'std::string getGlobalIP()':
otserv.cpp:252: error: 'WSADATA' was not declared in this scope
otserv.cpp:252: error: expected ';' before 'wsaData'
otserv.cpp:254: error: 'MAKEWORD' was not declared in this scope
otserv.cpp:254: error: 'wsaData' was not declared in this scope
otserv.cpp:254: error: 'WSAStartup' was not declared in this scope
otserv.cpp:257: error: 'SOCKET' was not declared in this scope
otserv.cpp:257: error: expected ';' before 's'
otserv.cpp:258: error: 'HOSTENT' was not declared in this scope
otserv.cpp:258: error: 'host' was not declared in this scope
otserv.cpp:260: error: 'SOCKADDR_IN' was not declared in this scope
otserv.cpp:260: error: expected ';' before 'sin'
otserv.cpp:261: error: ISO C++ forbids applying 'sizeof' to an expression of function type
otserv.cpp:261: error: invalid conversion from 'double (*)(double)throw ()' to 'void*'
otserv.cpp:261: error:   initializing argument 1 of 'void* memset(void*, int, size_t)'
otserv.cpp:263: error: request for member 'sin_family' in 'sin', which is of non-class type 'double(double)throw ()'
otserv.cpp:264: error: request for member 'sin_addr' in 'sin', which is of non-class type 'double(double)throw ()'
otserv.cpp:265: error: request for member 'sin_port' in 'sin', which is of non-class type 'double(double)throw ()'
otserv.cpp:267: error: 's' was not declared in this scope
otserv.cpp:267: error: ISO C++ forbids applying 'sizeof' to an expression of function type
otserv.cpp:267: error: 'SOCKET_ERROR' was not declared in this scope
otserv.cpp:271: error: 'WSAGetLastError' was not declared in this scope
otserv.cpp:281: warning: comparison between signed and unsigned integer expressions
otserv.cpp:285: error: 'closesocket' was not declared in this scope
otserv.cpp:278: warning: unused variable 'iplength'
otserv.cpp:290: error: 'WSAGetLastError' was not declared in this scope
make[1]: *** [otserv.o] Error 1
make[1]: Leaving directory `/home/tfs'
make: *** [all] Error 2

I need this source because I already started my windows one with that source and want to transfer it over to linux.
Anyone know what to do?

Thanks in advance!
 
You cannot use Win32 sockets in Linux. Remove the function "getGlobalIp()" and it's dependencies then try again.
 
Last edited:
Back
Top