每次在这个错误的任何一个copilar帮助 [英] help every time of this error in either of copilar

查看:94
本文介绍了每次在这个错误的任何一个copilar帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

处理输入...

正常构建...



编译src / burner / win32 / fba_ggpo.cpp .. .fba_ggpo.cpp

src / burner / win32 / fba_ggpo.cpp(43):错误C2664:'int VidSSetQuarkConnectStatus(const TCHAR *)':无法从'const char [24]'转换参数1到'const TCHAR *'

指向的类型是无关的;转换需要reinterpret_cast,C风格的转换或函数式转换

src / burner / win32 / fba_ggpo.cpp(47):错误C2664:'int VidSSetQuarkConnectStatus(const TCHAR *)':无法转换参数1从'const char [10]'到'const TCHAR *'

指向的类型是无关的;转换需要reinterpret_cast,C风格的转换或函数式转换

src / burner / win32 / fba_ggpo.cpp(51):错误C2664:'int VidSSetQuarkConnectStatus(const TCHAR *)':无法转换参数1从'const char [25]'到'const TCHAR *'

指向的类型不相关;转换需要reinterpret_cast,C风格的转换或函数式转换

src / burner / win32 / fba_ggpo.cpp(55):错误C2664:'int VidSSetQuarkConnectStatus(const TCHAR *)':无法转换参数1从'const char [14]'到'const TCHAR *'

指向的类型是无关的;转换需要reinterpret_cast,C风格的转换或函数式转换

src / burner / win32 / fba_ggpo.cpp(89):错误C2664:'char * strcpy(char *,const char *)' :无法将参数1从'TCHAR [256]'转换为'char *'

指向的类型不相关;转换需要reinterpret_cast,C风格的转换或函数式转换

src / burner / win32 / fba_ggpo.cpp(96):错误C2664:'int sprintf(char *,const char *,.. 。)':无法将参数1从'TCHAR [256]'转换为'char *'

指向的类型不相关;转换需要reinterpret_cast,C风格的转换或函数式转换

src / burner / win32 / fba_ggpo.cpp(101):错误C2664:'int sprintf(char *,const char *,.. 。)':无法将参数1从'TCHAR [256]'转换为'char *'

指向的类型不相关;转换需要reinterpret_cast,C风格的转换或函数式转换

src / burner / win32 / fba_ggpo.cpp(106):错误C2664:'int sprintf(char *,const char *,.. 。)':无法将参数1从'TCHAR [256]'转换为'char *'

指向的类型不相关;转换需要reinterpret_cast,C风格的转换或函数式转换

src / burner / win32 / fba_ggpo.cpp(129):错误C2664:'HANDLE FindFirstFileW(LPCWSTR,LPWIN32_FIND_DATAW)':无法转换参数1从'char [260]'到'LPCWSTR'

指向的类型不相关;转换需要reinterpret_cast,C风格的转换或函数式转换

src / burner / win32 / fba_ggpo.cpp(133):错误C2664:'INT32 BurnStateLoad(TCHAR *,INT32,INT32(__ cdecl *) )(void))':不能将参数1从'char [260]'转换为'TCHAR *'

指向的类型不相关;转换需要reinterpret_cast,C风格的转换或函数式转换

src / burner / win32 / fba_ggpo.cpp(137):错误C2440:'=':无法从'int'转换为'UINT32 [8]'

没有转换为数组类型,尽管转换为引用或指向数组的指针

src / burner / win32 / fba_ggpo.cpp(138) :错误C2664:'int wcscmp(const wchar_t *,const wchar_t *)':无法将参数2从'char *'转换为'const wchar_t *'

指向的类型不相关;转换需要reinterpret_cast,C风格的转换或函数式转换

src / burner / win32 / fba_ggpo.cpp(153):错误C3861:'RunFrame':找不到标识符

src / burner / win32 / fba_ggpo.cpp(285):错误C2065:'GGPOFBA_VERSION_0_25':未声明的标识符

src / burner / win32 / fba_ggpo.cpp(351):错误C2664:'int strncmp(const char *,const char *,size_t)':无法将参数1从'TCHAR *'转换为'const char *'

指向的类型不相关;转换需要reinterpret_cast,C风格的转换或函数式转换

src / burner / win32 / fba_ggpo.cpp(355):错误C2664:'int sscanf(const char *,const char * ,. ..)':不能将参数1从'TCHAR *'转换为'const char *'

指向的类型不相关;转换需要reinterpret_cast,C风格的转换或函数式转换

src / burner / win32 / fba_ggpo.cpp(357):错误C2664:'int strncmp(const char *,const char *,size_t )':不能将参数1从'TCHAR *'转换为'const char *'

指向的类型不相关;转换需要reinterpret_cast,C风格的转换或函数式转换

src / burner / win32 / fba_ggpo.cpp(361):错误C2664:'int sscanf(const char *,const char * ,. ..)':不能将参数1从'TCHAR *'转换为'const char *'

指向的类型不相关;转换需要reinterpret_cast,C风格的转换或函数式转换

src / burner / win32 / fba_ggpo.cpp(363):错误C2664:'int strncmp(const char *,const char *,size_t )':不能将参数1从'TCHAR *'转换为'const char *'

指向的类型不相关;转换需要reinterpret_cast,C风格的转换或函数式转换

src / burner / win32 / fba_ggpo.cpp(366):错误C2664:'int sscanf(const char *,const char * ,. ..)':不能将参数1从'TCHAR *'转换为'const char *'

指向的类型不相关;转换需要reinterpret_cast,C风格的转换或函数式转换

src / burner / win32 / fba_ggpo.cpp(368):错误C2664:'int strncmp(const char *,const char *,size_t )':不能将参数1从'TCHAR *'转换为'const char *'

指向的类型不相关;转换需要reinterpret_cast,C风格的转换或函数式转换

src / burner / win32 / fba_ggpo.cpp(372):错误C2664:'int sscanf(const char *,const char * ,. ..)':不能将参数1从'TCHAR *'转换为'const char *'

指向的类型不相关;转换需要reinterpret_cast,C风格的转换或函数式转换

src / burner / win32 / fba_ggpo.cpp(374):错误C2664:'int strncmp(const char *,const char *,size_t )':不能将参数1从'TCHAR *'转换为'const char *'

指向的类型不相关;转换需要reinterpret_cast,C风格的转换或函数式转换

src / burner / win32 / fba_ggpo.cpp(375):错误C2664:'GGPOSession * ggpo_start_replay(GGPOSessionCallbacks *,char *)':不能将参数2从'TCHAR *'转换为'char *'

指向的类型不相关;转换需要reinterpret_cast,C风格的转换或函数式转换

src / burner / win32 / fba_ggpo.cpp(507):错误C2664:'BOOL CreateDirectoryW(LPCWSTR,LPSECURITY_ATTRIBUTES)':无法转换参数1从'const char [12]'到'LPCWSTR'

指向的类型不相关;转换需要reinterpret_cast,C风格的转换或函数式转换

src / burner / win32 / fba_ggpo.cpp(509):错误C2664:'BOOL CreateDirectoryW(LPCWSTR,LPSECURITY_ATTRIBUTES)':无法转换参数1从'char [260]'到'LPCWSTR'

指向的类型不相关;转换需要reinterpret_cast,C风格的演员或函数式演员

mingw32-make [1]:*** [fba_ggpo.o]错误2

mingw32-make: *** [vc]错误2

选择:

Procesing input...
Making normal build...

Compiling src/burner/win32/fba_ggpo.cpp... fba_ggpo.cpp
src/burner/win32/fba_ggpo.cpp(43) : error C2664: 'int VidSSetQuarkConnectStatus(const TCHAR *)' : cannot convert argument 1 from 'const char [24]' to 'const TCHAR *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
src/burner/win32/fba_ggpo.cpp(47) : error C2664: 'int VidSSetQuarkConnectStatus(const TCHAR *)' : cannot convert argument 1 from 'const char [10]' to 'const TCHAR *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
src/burner/win32/fba_ggpo.cpp(51) : error C2664: 'int VidSSetQuarkConnectStatus(const TCHAR *)' : cannot convert argument 1 from 'const char [25]' to 'const TCHAR *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
src/burner/win32/fba_ggpo.cpp(55) : error C2664: 'int VidSSetQuarkConnectStatus(const TCHAR *)' : cannot convert argument 1 from 'const char [14]' to 'const TCHAR *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
src/burner/win32/fba_ggpo.cpp(89) : error C2664: 'char *strcpy(char *,const char *)' : cannot convert argument 1 from 'TCHAR [256]' to 'char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
src/burner/win32/fba_ggpo.cpp(96) : error C2664: 'int sprintf(char *,const char *,...)' : cannot convert argument 1 from 'TCHAR [256]' to 'char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
src/burner/win32/fba_ggpo.cpp(101) : error C2664: 'int sprintf(char *,const char *,...)' : cannot convert argument 1 from 'TCHAR [256]' to 'char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
src/burner/win32/fba_ggpo.cpp(106) : error C2664: 'int sprintf(char *,const char *,...)' : cannot convert argument 1 from 'TCHAR [256]' to 'char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
src/burner/win32/fba_ggpo.cpp(129) : error C2664: 'HANDLE FindFirstFileW(LPCWSTR,LPWIN32_FIND_DATAW)' : cannot convert argument 1 from 'char [260]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
src/burner/win32/fba_ggpo.cpp(133) : error C2664: 'INT32 BurnStateLoad(TCHAR *,INT32,INT32 (__cdecl *)(void))' : cannot convert argument 1 from 'char [260]' to 'TCHAR *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
src/burner/win32/fba_ggpo.cpp(137) : error C2440: '=' : cannot convert from 'int' to 'UINT32 [8]'
There are no conversions to array types, although there are conversions to references or pointers to arrays
src/burner/win32/fba_ggpo.cpp(138) : error C2664: 'int wcscmp(const wchar_t *,const wchar_t *)' : cannot convert argument 2 from 'char *' to 'const wchar_t *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
src/burner/win32/fba_ggpo.cpp(153) : error C3861: 'RunFrame': identifier not found
src/burner/win32/fba_ggpo.cpp(285) : error C2065: 'GGPOFBA_VERSION_0_25' : undeclared identifier
src/burner/win32/fba_ggpo.cpp(351) : error C2664: 'int strncmp(const char *,const char *,size_t)' : cannot convert argument 1 from 'TCHAR *' to 'const char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
src/burner/win32/fba_ggpo.cpp(355) : error C2664: 'int sscanf(const char *,const char *,...)' : cannot convert argument 1 from 'TCHAR *' to 'const char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
src/burner/win32/fba_ggpo.cpp(357) : error C2664: 'int strncmp(const char *,const char *,size_t)' : cannot convert argument 1 from 'TCHAR *' to 'const char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
src/burner/win32/fba_ggpo.cpp(361) : error C2664: 'int sscanf(const char *,const char *,...)' : cannot convert argument 1 from 'TCHAR *' to 'const char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
src/burner/win32/fba_ggpo.cpp(363) : error C2664: 'int strncmp(const char *,const char *,size_t)' : cannot convert argument 1 from 'TCHAR *' to 'const char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
src/burner/win32/fba_ggpo.cpp(366) : error C2664: 'int sscanf(const char *,const char *,...)' : cannot convert argument 1 from 'TCHAR *' to 'const char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
src/burner/win32/fba_ggpo.cpp(368) : error C2664: 'int strncmp(const char *,const char *,size_t)' : cannot convert argument 1 from 'TCHAR *' to 'const char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
src/burner/win32/fba_ggpo.cpp(372) : error C2664: 'int sscanf(const char *,const char *,...)' : cannot convert argument 1 from 'TCHAR *' to 'const char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
src/burner/win32/fba_ggpo.cpp(374) : error C2664: 'int strncmp(const char *,const char *,size_t)' : cannot convert argument 1 from 'TCHAR *' to 'const char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
src/burner/win32/fba_ggpo.cpp(375) : error C2664: 'GGPOSession *ggpo_start_replay(GGPOSessionCallbacks *,char *)' : cannot convert argument 2 from 'TCHAR *' to 'char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
src/burner/win32/fba_ggpo.cpp(507) : error C2664: 'BOOL CreateDirectoryW(LPCWSTR,LPSECURITY_ATTRIBUTES)' : cannot convert argument 1 from 'const char [12]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
src/burner/win32/fba_ggpo.cpp(509) : error C2664: 'BOOL CreateDirectoryW(LPCWSTR,LPSECURITY_ATTRIBUTES)' : cannot convert argument 1 from 'char [260]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
mingw32-make[1]: *** [fba_ggpo.o] Error 2
mingw32-make: *** [vc] Error 2
choice:

推荐答案

所有这些错误都是由同一个问题引起的:你正在路过错误类型的参数对指定的函数,每次一个类型是char *的一些变体,而另一个类型是一些多字节或宽字符串。



它目前还不清楚为什么你会得到这么多不同的错误,这些错误都是有效的 - 也许你试图只根据源文件重新创建一个项目而不知道项目设置?如果是这样,请检查项目属性并将属性字符集更改为未设置。



否则我没有看到任何其他方法,但通过将适当的变量类型或函数调用更改为适当的char类型和函数变量来单独修复每个错误(对于每个字符串函数有多字节和单字节字符串的变体)。最干净的方法是始终使用类型 TCHAR 而不是 char ,并使用期望的字符串函数变体 TCHAR 类型( TCHAR * LPCTSTR 等) 。有关MSDN和网络其他地方的字符集的更多信息。
All these errors are caused by one and the same issue: you are passing arguments of the wrong type to the indicated function, and every time one type is some variant of char* whereas the other type is some multibyte or wide character string.

It is unclear why you get so many different errors that are all efffectively the same - maybe you tried to recreate a project based only on the source files, without knowing the project settings? If so, check the project properties and change the property 'Character Set' to 'Not set'.

Otherwise I don't see any other way but fixing every error individually by changing the appropriate variable type or function call to the appropriate char types and function variants (for each string function there are variants for multibyte and single byte strings). The cleanest way would be to always use the type TCHAR instead of char, and use the string function variants that expect the TCHAR types (TCHAR*, LPCTSTR, etc.). There's more info on character sets on MSDN and elsewhere in the web.


您传递 char * 其中a TCHAR * 是预料之中的。您可能正在使用使用UNICODE字符集选项进行编译,这是一个使用多字节编写的项目。
You are passing char * where a TCHAR * is expected. You are probably compiling with the option 'Use UNICODE character set' a project written for using multi-byte one.


这篇关于每次在这个错误的任何一个copilar帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆