About Store Forum Documentation Contact



Post Reply 
RakNet, problem with header.
Author Message
mih Offline
Member

Post: #1
RakNet, problem with header.
Hi, I was also playing with RakNet last time, trying to make simple server-client model for my game. I just started to read about NAT handling, and have some problems with it.
After adding NatTypeDetectionClient.h, or any NAT headers I'm getting many errors from Vector.h file :
Code:
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(203) : warning C4003: not enough actual parameters for macro 'min'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(203) : error C2059: syntax error : '<L_TYPE_raw>'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(203) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(203) : error C2143: syntax error : missing ')' before '}'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(203) : error C2143: syntax error : missing '}' before ')'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(203) : error C2059: syntax error : ')'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(203) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(203) : error C2238: unexpected token(s) preceding ';'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(204) : warning C4003: not enough actual parameters for macro 'max'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(204) : error C2059: syntax error : ')'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(170) : error C3861: 'mul': identifier not found
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(171) : error C3861: 'mul': identifier not found
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(172) : error C2661: 'div' : no overloaded function takes 1 arguments
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(173) : error C2661: 'div' : no overloaded function takes 1 arguments
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(177) : error C2661: 'EE::Vec2::Vec2' : no overloaded function takes 2 arguments
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(178) : error C2661: 'EE::Vec2::Vec2' : no overloaded function takes 2 arguments
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(179) : error C2661: 'EE::Vec2::Vec2' : no overloaded function takes 2 arguments
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(180) : error C2661: 'EE::Vec2::Vec2' : no overloaded function takes 2 arguments
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(181) : error C2661: 'EE::Vec2::Vec2' : no overloaded function takes 2 arguments
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(182) : error C2661: 'EE::Vec2::Vec2' : no overloaded function takes 2 arguments
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(183) : error C2661: 'EE::Vec2::Vec2' : no overloaded function takes 2 arguments
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(184) : error C2661: 'EE::Vec2::Vec2' : no overloaded function takes 2 arguments
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(185) : error C2661: 'EE::Vec2::Vec2' : no overloaded function takes 2 arguments
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(186) : error C2661: 'EE::Vec2::Vec2' : no overloaded function takes 2 arguments
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(187) : error C2661: 'EE::Vec2::Vec2' : no overloaded function takes 2 arguments
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(188) : error C2661: 'EE::Vec2::Vec2' : no overloaded function takes 2 arguments
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(193) : error C2661: 'EE::Vec2::Vec2' : no overloaded function takes 2 arguments
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(194) : error C2039: 'normalize' : is not a member of 'EE::Vec2'
1>        c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(151) : see declaration of 'EE::Vec2'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(204) : error C2059: syntax error : ')'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(204) : error C2059: syntax error : ')'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(204) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(204) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(205) : error C2065: 'x' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(205) : error C2065: 'y' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(206) : error C2065: 'x' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(206) : error C2065: 'y' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(208) : error C2065: 'x' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(208) : error C2065: 'x' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(208) : error C2065: 'y' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(208) : error C2065: 'y' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(226) : error C2059: syntax error : ')'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(226) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(226) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(227) : error C2146: syntax error : missing ')' before identifier 'r'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(227) : error C2146: syntax error : missing ';' before identifier 'r'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(227) : error C2059: syntax error : ')'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(227) : error C2470: 'r' : looks like a function definition, but there is no parameter list; skipping apparent body
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(228) : error C2146: syntax error : missing ')' before identifier 'x'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(228) : error C2146: syntax error : missing ';' before identifier 'x'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(228) : error C2086: 'EE::Vec2 EE::Flt' : redefinition
1>        c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(227) : see declaration of 'EE::Flt'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(228) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(228) : error C2146: syntax error : missing ';' before identifier 'y'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(228) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(228) : error C2371: 'EE::Flt' : redefinition; different basic types
1>        c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(227) : see declaration of 'EE::Flt'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(228) : error C2059: syntax error : ')'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(228) : error C2470: 'y' : looks like a function definition, but there is no parameter list; skipping apparent body
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(229) : error C2143: syntax error : missing ')' before '&'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(229) : error C2143: syntax error : missing ';' before '&'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(229) : error C2059: syntax error : ')'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(229) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(229) : error C2530: 'EE::v' : references must be initialized
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(230) : error C2143: syntax error : missing ')' before '&'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(230) : error C2143: syntax error : missing ';' before '&'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(230) : error C2059: syntax error : ')'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(230) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(230) : error C2086: 'int &EE::v' : redefinition
1>        c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(229) : see declaration of 'EE::v'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(230) : error C2530: 'EE::v' : references must be initialized
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(231) : error C2143: syntax error : missing ')' before '&'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(231) : error C2143: syntax error : missing ';' before '&'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(231) : error C2059: syntax error : ')'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(231) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(231) : error C2086: 'int &EE::v' : redefinition
1>        c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(229) : see declaration of 'EE::v'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(231) : error C2530: 'EE::v' : references must be initialized
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(232) : error C2143: syntax error : missing ')' before '&'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(232) : error C2143: syntax error : missing ';' before '&'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(232) : error C2059: syntax error : ')'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(232) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(232) : error C2086: 'int &EE::v' : redefinition
1>        c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(229) : see declaration of 'EE::v'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(232) : error C2530: 'EE::v' : references must be initialized
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(255) : error C2061: syntax error : identifier 'MatrixD3'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(255) : error C2805: binary 'operator *=' has too few parameters
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(255) : error C2333: 'VecD2::operator *=' : error in function declaration; skipping function body
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(256) : error C2061: syntax error : identifier 'MatrixD'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(256) : error C2059: syntax error : 'return'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(256) : error C2238: unexpected token(s) preceding ';'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(257) : error C2143: syntax error : missing ';' before '&'
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(257) : error C2065: 'MatrixD3' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(257) : error C2065: 'm' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(257) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 9.0\vc\include\esenthelengine\Math/Vector.h(257) : fatal error C1903: unable to recover from previous error(s); stopping compilation
and this is how my stdafx.h file looks like:
Code:
#include <Raknet/MessageIdentifiers.h>
#include <Raknet/RakNetworkFactory.h>
#include <Raknet/RakPeerInterface.h>
#include <Raknet/RakNetTypes.h>
#include <Raknet/NatTypeDetectionClient.h>
/******************************************************************************/
#include <EsenthelEngine/EsenthelEngine.h>
/******************************************************************************/

any ideas what's wrong ?

//EDIT: when #include <Raknet/NatTypeDetectionClient.h> line is commented, everything works fine
(This post was last modified: 04-23-2010 12:08 PM by mih.)
04-23-2010 11:51 AM
Find all posts by this user Quote this message in a reply
lovee Offline
Member

Post: #2
RE: RakNet, problem with header.
using namespace ....?
I guesssmile
if RakNet use STL you need Statement.
04-23-2010 02:11 PM
Find all posts by this user Quote this message in a reply
mih Offline
Member

Post: #3
RE: RakNet, problem with header.
hm i don't understand, but using namespace [what ?] smile
Here is one of the files that cause problems, I don't know what it has to do with enigne Vector.h file xD :
Code:
// All this crap just to include type SOCKET

#if defined(_XBOX) || defined(X360)
                                                    
#elif defined(_PS3) || defined(__PS3__) || defined(SN_TARGET_PS3)
                                                                              
#elif defined(_WIN32)
typedef int socklen_t;
// IP_DONTFRAGMENT is different between winsock 1 and winsock 2.  Therefore, Winsock2.h must be linked againt Ws2_32.lib
// winsock.h must be linked against WSock32.lib.  If these two are mixed up the flag won't work correctly
#include <winsock2.h>
#else
#define closesocket close
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
#include <fcntl.h>
#define INVALID_SOCKET -1
//#include "RakMemoryOverride.h"
/// Unix/Linux uses ints for sockets
typedef int SOCKET;
#endif
Grzegorz, meybe You can look at it ?
04-23-2010 04:48 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: RakNet, problem with header.
04-23-2010 09:06 PM
Find all posts by this user Quote this message in a reply
mih Offline
Member

Post: #5
RE: RakNet, problem with header.
Sh*t grin I knew that those headers must be before esnethel header, but forgot to add that #define statement wink It works now, big thanks smile
04-23-2010 10:14 PM
Find all posts by this user Quote this message in a reply
oggs91 Offline
Member

Post: #6
RE: RakNet, problem with header.
(04-23-2010 10:14 PM)mih Wrote:  Sh*t grin I knew that those headers must be before esnethel header, but forgot to add that #define statement wink It works now, big thanks smile

solved my problems too smile
12-11-2010 03:04 PM
Find all posts by this user Quote this message in a reply
Post Reply