Programming & Scripting

View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

  Beginner BeginnerMember since: 13.04.2010, 16:36Posts: 5 Likes: 0
 

 Post Topic: Visual C++ 2010 FG-PluginSystem
PostPosted 01.11.2010, 17:50 
Hi guys. So i recently got vs 2010. And i tried to compile the fg-pluginsystem with it. But i get some errors:

Code:
1>------ Build started: Project: Joystick, Configuration: Profile x64 ------
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\Users\Mayx\Desktop\Folders\Crysis-Source\Mods\CrysisWarsMod\Code\..\Bin64\Joystick.dll) does not match the Linker's OutputFile property value (C:\Users\Mayx\Desktop\Folders\Crysis-Source\Mods\CrysisWarsMod\FGPlugins\Bin64\Joystick.dll). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1>LINK : fatal error LNK1181: cannot open input file 'dxguid.lib'
2>------ Build started: Project: FGPlugin, Configuration: Profile x64 ------
2>  ClientSynchedStorage.cpp
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility(163): error C2440: 'initializing' : cannot convert from 'int' to 'INetAtSyncItem *'
2>          Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
2>          C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility(247) : see reference to function template instantiation 'std::_Pair_base<_Ty1,_Ty2>::_Pair_base<_Ty,int>(_Other1 &&,_Other2 &&)' being compiled
2>          with
2>          [
2>              _Ty1=bool,
2>              _Ty2=INetAtSyncItem *,
2>              _Ty=bool,
2>              _Other1=bool,
2>              _Other2=int
2>          ]
2>          ClientSynchedStorage.cpp(25) : see reference to function template instantiation 'std::pair<_Ty1,_Ty2>::pair<bool,int>(_Other1 &&,_Other2 &&)' being compiled
2>          with
2>          [
2>              _Ty1=bool,
2>              _Ty2=INetAtSyncItem *,
2>              _Other1=bool,
2>              _Other2=int
2>          ]
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility(163): error C2439: 'std::_Pair_base<_Ty1,_Ty2>::second' : member could not be initialized
2>          with
2>          [
2>              _Ty1=bool,
2>              _Ty2=INetAtSyncItem *
2>          ]
2>          C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility(167) : see declaration of 'std::_Pair_base<_Ty1,_Ty2>::second'
2>          with
2>          [
2>              _Ty1=bool,
2>              _Ty2=INetAtSyncItem *
2>          ]
========== Build: 0 succeeded, 2 failed, 14 up-to-date, 0 skipped ==========


I have the dxsdk (june 2010), and the windows sdk (v7.1)
Any ideas?

User avatar   Uber Modder Uber ModderMember since: 19.03.2009, 12:21Posts: 2025Location: Sweden Likes: 29
 

 Post Topic:
PostPosted 01.11.2010, 19:30 
Open NetHelpers.h and replace this
Code:
return TNetMessageCallbackResult( ((cls*)p)->Handle##name( serialize, curSeq, oldSeq, pEntityId, pChannel ), NULL ); \

With this:
Code:
return TNetMessageCallbackResult( ((cls*)p)->Handle##name( serialize, curSeq, oldSeq, pEntityId, pChannel ), reinterpret_cast<INetAtSyncItem*>(NULL) ); \


  Beginner BeginnerMember since: 29.04.2012, 03:31Posts: 5Location: Finland Likes: 1
 

 Post Topic: Re: Visual C++ 2010 FG-PluginSystem
PostPosted 08.06.2012, 11:37 
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility(163): error C2440: 'initializing' : cannot convert from 'int' to 'INetAtSyncItem *'
2> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
2> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility(247) : see reference to function template instantiation 'std::_Pair_base<_Ty1,_Ty2>::_Pair_base<_Ty,int>(_Other1 &&,_Other2 &&)' being compiled
2> with
2> [
2> _Ty1=bool,
2> _Ty2=INetAtSyncItem *,
2> _Ty=bool,
2> _Other1=bool,
2> _Other2=int
2> ]
2> ClientSynchedStorage.cpp(25) : see reference to function template instantiation 'std::pair<_Ty1,_Ty2>::pair<bool,int>(_Other1 &&,_Other2 &&)' being compiled
2> with
2> [
2> _Ty1=bool,
2> _Ty2=INetAtSyncItem *,
2> _Other1=bool,
2> _Other2=int
2> ]
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility(163): error C2439: 'std::_Pair_base<_Ty1,_Ty2>::second' : member could not be initialized
2> with
2> [
2> _Ty1=bool,
2> _Ty2=INetAtSyncItem *
2> ]
2> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility(167) : see declaration of 'std::_Pair_base<_Ty1,_Ty2>::second'
2> with
2> [
2> _Ty1=bool,
2> _Ty2=INetAtSyncItem *
2> ]


Image