Click here to Skip to main content
15,894,343 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
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:
Posted
Comments
robsons2007 14-Sep-15 22:32pm    
chandanadhikari 15-Sep-15 0:45am    
hi,
kindly try to elaborate more on the problem like show us the code where you got stuck. The error messages are pretty precise:
"... cannot convert argument 1 from 'const char [24]' to 'const TCHAR * .. "
the type conversions have failed.The called API expects an argument of a different type but its being called with a different type and implicit conversion is not allowed for this scenario and the API does not have any overload which accepts the type of argument its being provided.

Maybe you can search in the code where 'VidSSetQuarkConnectStatus' is called correctly and take hint from there.
Mohibur Rashid 15-Sep-15 4:00am    
read this page:
http://sourceforge.net/p/mingw-w64/wiki2/Unicode%20apps/
The error is
cannot convert argument 1 from 'const char [24]' to 'const TCHAR *'
What is your TCHAR? is wchar_t or char? Probably wchar_t.
It seems that you have enabled unicode or you are calling function that demands unicode value.
Try this VidSSetQuarkConnectStatus(L"So called Unicode"); and see what happens..
robsons2007 15-Sep-15 20:06pm    

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.
 
Share this answer
 
Comments
robsons2007 15-Sep-15 20:13pm    
code of the link that is generating me error
http://www.4shared.com/rar/2h622_9Mba/erro.html

help help .if someone fix will have refereciado name in online gaming website prototype
Stefan_Lang 16-Sep-15 2:26am    
The core of the problem is in the project settings, not the code!

Again: you must choose a character set in your application. Then you must select that character set in your project settings, you must use the appropriate char and string types in your code, and you must select the external libraries that are compiled for this character set. If you mix character sets in any way, you get these errors. Therefore you must check everything and make them match, not just the code.

If you have trouble understanding, find some friend with a better understanding of english.
robsons2007 16-Sep-15 21:06pm    
src / gravador / win32 / fba_ggpo.cpp (129): erro C2664: 'SEGURAR FindFirstFileW (LPCWSTR, LPWIN32_FIND_DATAW)': não é possível converter argumento 1 do 'char [260]' para 'LPCWSTR'
Tipos apontou para não estão relacionados; conversão requer reinterpret_cast, elenco C-estilo ou função de estilo elenco
src / gravador / win32 / fba_ggpo.cpp (133): erro C2664: 'INT32 BurnStateLoad (TCHAR *, Int32, Int32 (__cdecl *) (void))': não é possível converter argumento 1 do 'char [260]' para 'TCHAR *'

<p>Amigos obrigado pela dica o primeiro erro que eu estou agora corrigir estes</p>


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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900