我刚刚从 friend 那里接手了游戏开发。使用VC++完成开发。
在Visual Studio 2008 Professional Edition上构建该代码时,它可以完美地工作。
没有进行任何更改,我尝试在VC++ Express 2008 Edition中构建代码,并引发许多错误(超过100个)。全部都是:
error C2953: 'std::tr1::_Result_of1<Rx(_thiscall _Arg0::* )(void),_Farg0&>' : class template has already been defined C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\xxresult 106
或error C2995: 'std::tr1::_Mem_fn1<_Rx,Rx(_thiscall _Arg0::* )(void),_Arg0> std::tr1::mem_fn(Rx (_thiscall _Arg0::* )(void))' : function template has already been defined C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\xxmem_fn 47
由于所有错误似乎都是由于包含文件引起的,而不是由于编写的代码引起的,所以我陷入了困境。最佳答案
看起来您正在使用Nebula2 :)
在nsystem.h
中删除"#define __cdecl"
如果某处出现的定义如下,也会发生此错误:
#define __cdecl
#define volatile
#define const
关于visual-studio-2008 - 从VS2008 Prof迁移到VC++ Express 2008时出现构建问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4966782/