[Opentnl-general] Hello World
Brought to you by:
mark_frohnmayer,
s_alanet
From: alewela a. <al...@gm...> - 2008-06-17 10:13:42
|
Hi, I'm building a test project, Hello World, with the code written in the official documentation: http://opentnl.sourceforge.net/doxydocs/simpletutorial.html It seems that the article hasn't been updated for a while so that the code doesn't compile. TNL_IMPLEMENT_RPC requires one more parameter, argNames. I added the argNames, so the code became: TNL_IMPLEMENT_RPC(SimpleEventConnection, rpcMessageClientToServer, (const char *messageString), (messageString), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 0) But it still didn't compile: 1>HelloWorld.cpp 1>e:\projects\tnl\tnl\tnlMethodDispatch.h(85) : error C2664: 'bool TNL::BitStream::read(TNL::ByteBuffer *)' : cannot convert parameter 1 from 'const char **' to 'TNL::ByteBuffer *' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1> e:\projects\tnl\tnl\tnlMethodDispatch.h(213) : see reference to function template instantiation 'void Types::read<A>(TNL::BitStream &,T *)' being compiled 1> with 1> [ 1> A=const char *, 1> T=const char * 1> ] 1> e:\projects\tnl\tnl\tnlMethodDispatch.h(213) : while compiling class template member function 'void TNL::FunctorDecl<T>::read(TNL::BitStream &)' 1> with 1> [ 1> T=void (__thiscall SimpleEventConnection::* )(const char *) 1> ] 1> .\HelloWorld.cpp(34) : see reference to class template instantiation 'TNL::FunctorDecl<T>' being compiled 1> with 1> [ 1> T=void (__thiscall SimpleEventConnection::* )(const char *) 1> ] How should I modify it to make it work? I'm using Visual Studio 2005 (8.0) with SP1. Thanks. alewela |