help
-
Linking executable ggpofba-ng.exe... main.o : error LNK2001: símbolos externos indefinidos "void __cdecl QuarkInit(wchar_t *)" (?QuarkInit@@YAXPA_W@Z) ggpofba-ng.exe : fatal error LNK1120: 1 externo não resolvidos makefile.vc:313: recipe for target 'ggpofba-ng.exe' failed mingw32-make[2]: *** [ggpofba-ng.exe] Error 1120 this error is happening at the end of compilation I already posted something about it helped me include everything right in .he cpp I discovered that for this error does not appear I have to change in cpp put TCHAR more if I do more error appears in the .cpp then he is char how do I corrigiri so I will let the three files containing this function I grasped C ++ now vlw
part of the .cpp QuarkInit(CHAR *connect) { GGPOSessionCallbacks cb = { 0 }; bNetGame = TRUE; cb.begin_game = ggpo_begin_game_callback; cb.load_game_state = ggpo_load_game_state_callback; cb.save_game_state = ggpo_save_game_state_callback; cb.log_game_state = ggpo_log_game_state_callback; cb.free_buffer = ggpo_free_buffer_callback; cb.advance_frame = ggpo_advance_frame_callback; cb.on_event = ggpo_on_event_callback; //cb.Alert = QuarkAlert; if (printf(connect, "quark:served", strlen("quark:served")) == 0) { int port; TCHAR game[256], match[256]; sscanf(connect, "quark:served,%[^,],%[^,],%d", game, match, &port); //ggpo = ggpo_client_connect(&cb, game, match, port); } else if (strncmp(connect, "quark:direct", strlen("quark:direct")) == 0) { int localPort, remotePort, p1 = 0; char ip[128], game[128]; sscanf(connect, "quark:direct,%[^,],%d,%[^,],%d,%d", game, &localPort, ip, &remotePort, &p1); ggpo = ggpo_start_session(&cb, game, localPort, ip, remotePort, p1); } else if (strncmp(connect, "quark:synctest", strlen("quark:synctest")) == 0) { int frames; char game[128]; sscanf(connect, "quark:synctest,%[^,],%d", game, &frames); ggpo = ggpo_start_synctest(&cb, game, frames); } else if (strncmp(connect, "quark:stream", strlen("quark:stream")) == 0) { char game[256], matchid[256]; int port; sscanf(connect, "quark:stream,%[^,],%[^,],%d", game, matchid, &port); ggpo = ggpo_start_streaming(&cb, game, matchid, port); } else if (strncmp(connect, "quark:replay", strlen("quark:replay")) == 0) { ggpo = ggpo_start_replay(&cb, connect + strlen("quark:replay,")); } VidSSetQuarkShowLogo(true); }
-
Linking executable ggpofba-ng.exe... main.o : error LNK2001: símbolos externos indefinidos "void __cdecl QuarkInit(wchar_t *)" (?QuarkInit@@YAXPA_W@Z) ggpofba-ng.exe : fatal error LNK1120: 1 externo não resolvidos makefile.vc:313: recipe for target 'ggpofba-ng.exe' failed mingw32-make[2]: *** [ggpofba-ng.exe] Error 1120 this error is happening at the end of compilation I already posted something about it helped me include everything right in .he cpp I discovered that for this error does not appear I have to change in cpp put TCHAR more if I do more error appears in the .cpp then he is char how do I corrigiri so I will let the three files containing this function I grasped C ++ now vlw
part of the main.cpp else if (_tcsncmp(szName, _T("quark:"), 6) == 0) { QuarkInit(szName);
-
Linking executable ggpofba-ng.exe... main.o : error LNK2001: símbolos externos indefinidos "void __cdecl QuarkInit(wchar_t *)" (?QuarkInit@@YAXPA_W@Z) ggpofba-ng.exe : fatal error LNK1120: 1 externo não resolvidos makefile.vc:313: recipe for target 'ggpofba-ng.exe' failed mingw32-make[2]: *** [ggpofba-ng.exe] Error 1120 this error is happening at the end of compilation I already posted something about it helped me include everything right in .he cpp I discovered that for this error does not appear I have to change in cpp put TCHAR more if I do more error appears in the .cpp then he is char how do I corrigiri so I will let the three files containing this function I grasped C ++ now vlw
part of the .h // fba_quark.cpp bool QuarkInit(CHAR *connect); bool QuarkNetworkGame(); bool QuarkDumpSprites();
-
Linking executable ggpofba-ng.exe... main.o : error LNK2001: símbolos externos indefinidos "void __cdecl QuarkInit(wchar_t *)" (?QuarkInit@@YAXPA_W@Z) ggpofba-ng.exe : fatal error LNK1120: 1 externo não resolvidos makefile.vc:313: recipe for target 'ggpofba-ng.exe' failed mingw32-make[2]: *** [ggpofba-ng.exe] Error 1120 this error is happening at the end of compilation I already posted something about it helped me include everything right in .he cpp I discovered that for this error does not appear I have to change in cpp put TCHAR more if I do more error appears in the .cpp then he is char how do I corrigiri so I will let the three files containing this function I grasped C ++ now vlw
It is not a compiler error but a linker error telling you that the function
QuarkInit()
called from within the file main has not been found in any of your compiled files or libraries. It it is contained in a library, you must add that library to your project. If it is located in some of your source files, check for correct spelling and parameter types and that the file is included in your project.TCHAR
and the_T()
macro are extension used originally by the Microsoft compiler (Visual Studio). With mingw, you must include tchar.h and use an additional linker option when building an Unicode application (see http://sourceforge.net/p/mingw-w64/wiki2/Unicode%20apps/[^]). -
part of the .h // fba_quark.cpp bool QuarkInit(CHAR *connect); bool QuarkNetworkGame(); bool QuarkDumpSprites();
-
It is not a compiler error but a linker error telling you that the function
QuarkInit()
called from within the file main has not been found in any of your compiled files or libraries. It it is contained in a library, you must add that library to your project. If it is located in some of your source files, check for correct spelling and parameter types and that the file is included in your project.TCHAR
and the_T()
macro are extension used originally by the Microsoft compiler (Visual Studio). With mingw, you must include tchar.h and use an additional linker option when building an Unicode application (see http://sourceforge.net/p/mingw-w64/wiki2/Unicode%20apps/[^]).when they procure step QuarkInit ( TCHAR * connect) he did not correct me back the main error plus it returns these errors in my function and do not know how to fix excuse the English BR error C2664: 'int printf(const char *,...)': não é possível converter um argumento 1 de 'TCHAR *' em 'const char *' Tipos apontados não são relacionados; conversão requer reinterpret_cast, conversão C-style ou conversão function-style
-
It is not a compiler error but a linker error telling you that the function
QuarkInit()
called from within the file main has not been found in any of your compiled files or libraries. It it is contained in a library, you must add that library to your project. If it is located in some of your source files, check for correct spelling and parameter types and that the file is included in your project.TCHAR
and the_T()
macro are extension used originally by the Microsoft compiler (Visual Studio). With mingw, you must include tchar.h and use an additional linker option when building an Unicode application (see http://sourceforge.net/p/mingw-w64/wiki2/Unicode%20apps/[^]).where this error if ( printf(connect, "quark:served", strlen("quark:served")) == 0) { int port; char game[256], match[256];
-
Reset your application properties to use ASCII rather than Unicode, or find a matching Unicode library for the Quark functions.
Go to Parentwhen they procure step QuarkInit ( TCHAR * connect) he did not correct me back the main error plus it returns these errors in my function and do not know how to fix excuse the English BR error C2664: 'int printf(const char *,...)': não é possível converter um argumento 1 de 'TCHAR *' em 'const char *' Tipos apontados não são relacionados; conversão requer reinterpret_cast, conversão C-style ou conversão function-style if I send to you the code is how you correct for me the code and an online game emulator
-
Go to Parentwhen they procure step QuarkInit ( TCHAR * connect) he did not correct me back the main error plus it returns these errors in my function and do not know how to fix excuse the English BR error C2664: 'int printf(const char *,...)': não é possível converter um argumento 1 de 'TCHAR *' em 'const char *' Tipos apontados não são relacionados; conversão requer reinterpret_cast, conversão C-style ou conversão function-style if I send to you the code is how you correct for me the code and an online game emulator
robsons2007 wrote:
if I send to you the code
No, my support is confined to answering questions here. The problem is that you are mixing ASCII and non-ASCII constants and variables within your code, and confusing both the compiler and the linker. Take a look at What are TCHAR, WCHAR, LPSTR, LPWSTR, LPCTSTR (etc.)?[^].
-
robsons2007 wrote:
if I send to you the code
No, my support is confined to answering questions here. The problem is that you are mixing ASCII and non-ASCII constants and variables within your code, and confusing both the compiler and the linker. Take a look at What are TCHAR, WCHAR, LPSTR, LPWSTR, LPCTSTR (etc.)?[^].
thanks for the help friend