RakNet implementation compile error
by Alexandre Ribeiro de Sa · in Torque Game Builder · 09/22/2010 (5:07 am) · 2 replies
I'm with a problem when I try to compile the TGB with RakNet...
this is the error:
netRakNet.obj : error LNK2005: "void * __cdecl operator new(unsigned int,void *)" (??2@YAPAXIPAX@Z) already defined in winMemory.obj
../../../tgb/gameData/T2DProject/TGBGame.exe : fatal error LNK1169: one or more multiply defined symbols found
I'm was reading the forum, and almost every post was about STL problem, but I did'n found any STL call inside the RakNet header files...
Here what I'm doing:
Header file
All the best!
this is the error:
netRakNet.obj : error LNK2005: "void * __cdecl operator new(unsigned int,void *)" (??2@YAPAXIPAX@Z) already defined in winMemory.obj
../../../tgb/gameData/T2DProject/TGBGame.exe : fatal error LNK1169: one or more multiply defined symbols found
I'm was reading the forum, and almost every post was about STL problem, but I did'n found any STL call inside the RakNet header files...
Here what I'm doing:
Header file
#ifndef _NETRAKNET_H_
#define _NETRAKNET_H_
#ifndef _SIMBASE_H_
#include "console/simBase.h"
#endif
#include "raknet/include/MessageIdentifiers.h"
#include "raknet/include/RakPeerInterface.h"
#include "raknet/include/RakNetTypes.h"
class netRakNet : public SimObject
{
public:
typedef SimObject Parent;
bool ServerConnect( unsigned short serverMaxAllowed, unsigned short serverMaxUser, unsigned short serverPort);
bool PeertoPeerConnect( unsigned short serverMaxAllowed, unsigned short serverMaxUser, unsigned short serverPort);
bool ClientConnect( char* serverIP, unsigned short serverPort);
DECLARE_CONOBJECT( netRakNet );
private:
RakNet::RakPeerInterface* peer;
};
#endifAll the best!
About the author
now with an iPod :D
Torque Owner Alain Labrie
Ware-Wolf Games