Welcome, Guest. Please login or register.
Did you miss your activation email?
September 09, 2010, 03:46:26 PM

Login with username, password and session length
Search:     Advanced search
07/30/10 RakNet 4.0 beta 4 released.
15517 Posts in 3100 Topics by 3136 Members
Latest Member: nancy_cute25
« previous next »
Pages: [1] Print
Author Topic: Cannot complier the RPC3.h  (Read 111 times)
BigPlastic
Newbie
*

Karma: 0
Posts: 3


View Profile
« on: March 11, 2010, 04:06:26 AM »

Pls help, I cannot complier the program which include the "RPC3.h"

my program is very simple:

#include <cstdlib>
#include <iostream>
#include <stdio.h>
#include <string.h>
#include "RPC3.h"
#include "MessageIdentifiers.h"
#include "RakNetworkFactory.h"
#include "RakPeerInterface.h"
#include "RakNetTypes.h"

using namespace std;

int main(int argc, char *argv[])
{
    char str[512];
   
    printf("hello world");
   
    system("PAUSE");
    return EXIT_SUCCESS;
}


//--------------------------------------------------------------------
// Output :
C:\MyProject\ChatServer\main.cpp In file included from main.cpp
131 C:\download\RakNet\Source\RPC3.h `static int RakNet::RPC3::LocalSlotObjectComp(const RakNet::RPC3::LocalSlotObject&, const RakNet::RPC3::LocalSlotObject&)' cannot appear in a constant-expression
131 C:\download\RakNet\Source\RPC3.h template argument 3 is invalid



I already setup the project option (Use Dev-C++):
Include directories:
C:\download\RakNet\DependentExtensions\RPC3
C:\download\RakNet\Source
C:\download\boost_1_42_0

Lib directories:
C:\download\RakNet



When I remark the "RPC3.h" , it is ok.

And I don't know which part I am missing....
The video of RPC3 do not show how to setup the project option.....

thanks






« Last Edit: March 11, 2010, 04:12:50 AM by BigPlastic » Report to moderator   Logged
Rak'kar
Administrator
Hero Member
*****

Karma: 236
Posts: 5068



View Profile WWW
« Reply #1 on: March 15, 2010, 11:25:49 AM »

Sorry, RPC3 hasn't been ported to or tested with DevCPP. It only works with gcc and Visual Studio as far as I know. If you do manage to fix the compiler errors on your own let me know and I'll include the fixes with the next version.
Report to moderator   Logged
BigPlastic
Newbie
*

Karma: 0
Posts: 3


View Profile
« Reply #2 on: March 16, 2010, 09:40:18 AM »

thx your reply !! no need waste time on DEV-C++

Now I start the project at MS visual studio 2008.

And complies the "RPC3Sample"

1. Compiling is success
2. Link have error :
    The following lib I already setup at my project
     RakNetLibStaticDebug.lib
     RakNetDLLDebug.lib
     winmm.lib
     ws2_32.lib
Is I miss any lib ?


Linking...
RakNetLibStaticDebug.lib(NetworkIDObject.obj) : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
LIBCMTD.lib(_trnsctrl_.obj) : error LNK2005: ___CxxFrameHandler already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: virtual char const * __thiscall std::exception::what(void)const " (?what@exception@std@@UBEPBDXZ) already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(dbgheap.obj) : error LNK2005: __CrtSetCheckCount already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(dbghook.obj) : error LNK2005: __crt_debugger_hook already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(setlocal.obj) : error LNK2005: __configthreadlocale already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(sprintf.obj) : error LNK2005: _sprintf already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(typinfo.obj) : error LNK2005: "public: void __thiscall type_info::_type_info_dtor_internal_method(void)" (?_type_info_dtor_internal_method@type_info@@QAEXXZ) already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(typinfo.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in MSVCRTD.lib(ti_inst.obj)
LIBCMTD.lib(typinfo.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in MSVCRTD.lib(ti_inst.obj)
LIBCMTD.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0.obj) : error LNK2005: _mainCRTStartup already defined in MSVCRTD.lib(crtexe.obj)
LIBCMTD.lib(errmode.obj) : error LNK2005: ___set_app_type already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRTD.lib(cinitexe.obj)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRTD.lib(cinitexe.obj)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRTD.lib(cinitexe.obj)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRTD.lib(cinitexe.obj)
LIBCMTD.lib(dbgrptw.obj) : error LNK2005: __CrtDbgReportW already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(stricmp.obj) : error LNK2005: __stricmp already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(atox.obj) : error LNK2005: _atoi already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(atox.obj) : error LNK2005: __atoi64 already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(printf.obj) : error LNK2005: _printf already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(strnicmp.obj) : error LNK2005: __strnicmp already defined in MSVCRTD.lib(MSVCR90D.dll)
LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library
RPC3Sample.obj : error LNK2028: unresolved token (0A000841) "public: __thiscall RakNet::RPC3::RPC3(void)" (??0RPC3@RakNet@@$$FQAE@XZ) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)
RPC3Sample.obj : error LNK2028: unresolved token (0A000842) "public: void __thiscall RakNet::RPC3::SetNetworkIDManager(class NetworkIDManager *)" (?SetNetworkIDManager@RPC3@RakNet@@$$FQAEXPAVNetworkIDManager@@@Z) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)
RPC3Sample.obj : error LNK2028: unresolved token (0A000844) "public: bool __thiscall RakNet::RPC3::IsFunctionRegistered(char const *)" (?IsFunctionRegistered@RPC3@RakNet@@$$FQAE_NPBD@Z) referenced in function "public: bool __thiscall RakNet::RPC3::RegisterFunction<void (__thiscall C::*)(class RakNet::RPC3 *)>(char const *,void (__thiscall C::*)(class RakNet::RPC3 *))" (??$RegisterFunction@P8C@@AEXPAVRPC3@RakNet@@@Z@RPC3@RakNet@@$$FQAE_NPBDP8C@@AEXPAV01@@Z@Z)
RPC3Sample.obj : error LNK2028: unresolved token (0A000848) "public: void __thiscall RakNet::RPC3::SetRecipientObject(struct NetworkID)" (?SetRecipientObject@RPC3@RakNet@@$$FQAEXUNetworkID@@@Z) referenced in function "public: bool __thiscall RakNet::RPC3::CallCPP<class RakNet::RPC3 *>(char const *,struct NetworkID,class RakNet::RPC3 * &)" (??$CallCPP@PAVRPC3@RakNet@@@RPC3@RakNet@@$$FQAE_NPBDUNetworkID@@AAPAV01@@Z)
RPC3Sample.obj : error LNK2028: unresolved token (0A000849) "public: struct SystemAddress __thiscall RakNet::RPC3::GetLastSenderAddress(void)const " (?GetLastSenderAddress@RPC3@RakNet@@$$FQBE?AUSystemAddress@@XZ) referenced in function "public: virtual void __thiscall B::ClassMemberFunc(class A *,class A &,class C *,class D *,class RakNet::BitStream *,class RakNet::BitStream &,class RakNet::RPC3 *)" (?ClassMemberFunc@B@@$$FUAEXPAVA@@AAV2@PAVC@@PAVD@@PAVBitStream@RakNet@@AAV56@PAVRPC3@6@@Z)
RPC3Sample.obj : error LNK2028: unresolved token (0A00084A) "public: bool __thiscall RakNet::RPC3::SendCallOrSignal(class RakNet::RakString,char,class RakNet::BitStream *,bool)" (?SendCallOrSignal@RPC3@RakNet@@$$FQAE_NVRakString@2@DPAVBitStream@2@_N@Z) referenced in function "public: bool __thiscall RakNet::RPC3::Signal(char const *)" (?Signal@RPC3@RakNet@@$$FQAE_NPBD@Z)
RPC3Sample.obj : error LNK2028: unresolved token (0A00084B) "public: void __thiscall RakNet::RPC3::InvokeSignal(struct DataStructures::StringKeyedHashIndex,class RakNet::BitStream *,bool)" (?InvokeSignal@RPC3@RakNet@@$$FQAEXUStringKeyedHashIndex@DataStructures@@PAVBitStream@2@_N@Z) referenced in function "public: bool __thiscall RakNet::RPC3::Signal(char const *)" (?Signal@RPC3@RakNet@@$$FQAE_NPBD@Z)
RPC3Sample.obj : error LNK2028: unresolved token (0A00084C) "protected: struct DataStructures::StringKeyedHashIndex __thiscall RakNet::RPC3::GetLocalSlotIndex(char const *)" (?GetLocalSlotIndex@RPC3@RakNet@@$$FIAE?AUStringKeyedHashIndex@DataStructures@@PBD@Z) referenced in function "public: bool __thiscall RakNet::RPC3::Signal(char const *)" (?Signal@RPC3@RakNet@@$$FQAE_NPBD@Z)
RPC3Sample.obj : error LNK2019: unresolved external symbol "public: bool __thiscall RakNet::RPC3::SendCallOrSignal(class RakNet::RakString,char,class RakNet::BitStream *,bool)" (?SendCallOrSignal@RPC3@RakNet@@$$FQAE_NVRakString@2@DPAVBitStream@2@_N@Z) referenced in function "public: bool __thiscall RakNet::RPC3::Signal(char const *)" (?Signal@RPC3@RakNet@@$$FQAE_NPBD@Z)
RPC3Sample.obj : error LNK2019: unresolved external symbol "public: void __thiscall RakNet::RPC3::InvokeSignal(struct DataStructures::StringKeyedHashIndex,class RakNet::BitStream *,bool)" (?InvokeSignal@RPC3@RakNet@@$$FQAEXUStringKeyedHashIndex@DataStructures@@PAVBitStream@2@_N@Z) referenced in function "public: bool __thiscall RakNet::RPC3::Signal(char const *)" (?Signal@RPC3@RakNet@@$$FQAE_NPBD@Z)
RPC3Sample.obj : error LNK2019: unresolved external symbol "protected: struct DataStructures::StringKeyedHashIndex __thiscall RakNet::RPC3::GetLocalSlotIndex(char const *)" (?GetLocalSlotIndex@RPC3@RakNet@@$$FIAE?AUStringKeyedHashIndex@DataStructures@@PBD@Z) referenced in function "public: bool __thiscall RakNet::RPC3::Signal(char const *)" (?Signal@RPC3@RakNet@@$$FQAE_NPBD@Z)
RPC3Sample.obj : error LNK2019: unresolved external symbol "public: struct SystemAddress __thiscall RakNet::RPC3::GetLastSenderAddress(void)const " (?GetLastSenderAddress@RPC3@RakNet@@$$FQBE?AUSystemAddress@@XZ) referenced in function "public: virtual void __thiscall B::ClassMemberFunc(class A *,class A &,class C *,class D *,class RakNet::BitStream *,class RakNet::BitStream &,class RakNet::RPC3 *)" (?ClassMemberFunc@B@@$$FUAEXPAVA@@AAV2@PAVC@@PAVD@@PAVBitStream@RakNet@@AAV56@PAVRPC3@6@@Z)
RPC3Sample.obj : error LNK2019: unresolved external symbol "public: void __thiscall RakNet::RPC3::SetRecipientObject(struct NetworkID)" (?SetRecipientObject@RPC3@RakNet@@$$FQAEXUNetworkID@@@Z) referenced in function "public: bool __thiscall RakNet::RPC3::CallCPP<class RakNet::RPC3 *>(char const *,struct NetworkID,class RakNet::RPC3 * &)" (??$CallCPP@PAVRPC3@RakNet@@@RPC3@RakNet@@$$FQAE_NPBDUNetworkID@@AAPAV01@@Z)
RPC3Sample.obj : error LNK2001: unresolved external symbol "public: static int __cdecl RakNet::RPC3::LocalSlotObjectComp(struct RakNet::RPC3::LocalSlotObject const &,struct RakNet::RPC3::LocalSlotObject const &)" (?LocalSlotObjectComp@RPC3@RakNet@@SAHABULocalSlotObject@12@0@Z)
RPC3Sample.obj : error LNK2019: unresolved external symbol "public: bool __thiscall RakNet::RPC3::IsFunctionRegistered(char const *)" (?IsFunctionRegistered@RPC3@RakNet@@$$FQAE_NPBD@Z) referenced in function "public: bool __thiscall RakNet::RPC3::RegisterFunction<void (__thiscall C::*)(class RakNet::RPC3 *)>(char const *,void (__thiscall C::*)(class RakNet::RPC3 *))" (??$RegisterFunction@P8C@@AEXPAVRPC3@RakNet@@@Z@RPC3@RakNet@@$$FQAE_NPBDP8C@@AEXPAV01@@Z@Z)
RPC3Sample.obj : error LNK2019: unresolved external symbol "public: void __thiscall RakNet::RPC3::SetNetworkIDManager(class NetworkIDManager *)" (?SetNetworkIDManager@RPC3@RakNet@@$$FQAEXPAVNetworkIDManager@@@Z) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)
RPC3Sample.obj : error LNK2019: unresolved external symbol "public: __thiscall RakNet::RPC3::RPC3(void)" (??0RPC3@RakNet@@$$FQAE@XZ) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)
D:\MyProject\RPCSample\Debug\RPCSample.exe : fatal error LNK1120: 17 unresolved externals
Build log was saved at "file://d:\MyProject\RPCSample\RPCSample\Debug\BuildLog.htm"
RPCSample - 51 error(s), 7 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========



really thx so much !!! Cheesy
Report to moderator   Logged
Rak'kar
Administrator
Hero Member
*****

Karma: 236
Posts: 5068



View Profile WWW
« Reply #3 on: March 16, 2010, 09:44:02 AM »

http://forums.devx.com/archive/index.php/t-94592.html

But the problem is probably that you are not using the provided solution.

Open RakNet_VS2005.sln
Build DLL and LibStatic. You can also build RPC3 and test it there if you want.

Then if you want to link to the lib or DLL, grab it from /Lib
Report to moderator   Logged
BigPlastic
Newbie
*

Karma: 0
Posts: 3


View Profile
« Reply #4 on: March 16, 2010, 10:23:41 AM »

YEAH well done , thx so much !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Report to moderator   Logged
Pages: [1] Print 
« previous next »
Jump to: