Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. help

help

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestionc++
11 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    robsons2007
    wrote on last edited by
    #1

    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

    R J 4 Replies Last reply
    0
    • R robsons2007

      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

      R Offline
      R Offline
      robsons2007
      wrote on last edited by
      #2

      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); }

      1 Reply Last reply
      0
      • R robsons2007

        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

        R Offline
        R Offline
        robsons2007
        wrote on last edited by
        #3

        part of the main.cpp else if (_tcsncmp(szName, _T("quark:"), 6) == 0) { QuarkInit(szName);

        1 Reply Last reply
        0
        • R robsons2007

          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

          R Offline
          R Offline
          robsons2007
          wrote on last edited by
          #4

          part of the .h // fba_quark.cpp bool QuarkInit(CHAR *connect); bool QuarkNetworkGame(); bool QuarkDumpSprites();

          L 1 Reply Last reply
          0
          • R robsons2007

            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

            J Offline
            J Offline
            Jochen Arndt
            wrote on last edited by
            #5

            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/[^]).

            R 2 Replies Last reply
            0
            • R robsons2007

              part of the .h // fba_quark.cpp bool QuarkInit(CHAR *connect); bool QuarkNetworkGame(); bool QuarkDumpSprites();

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Reset your application properties to use ASCII rather than Unicode, or find a matching Unicode library for the Quark functions.

              R 1 Reply Last reply
              0
              • J Jochen Arndt

                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/[^]).

                R Offline
                R Offline
                robsons2007
                wrote on last edited by
                #7

                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

                1 Reply Last reply
                0
                • J Jochen Arndt

                  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/[^]).

                  R Offline
                  R Offline
                  robsons2007
                  wrote on last edited by
                  #8

                  where this error if ( printf(connect, "quark:served", strlen("quark:served")) == 0) { int port; char game[256], match[256];

                  1 Reply Last reply
                  0
                  • L Lost User

                    Reset your application properties to use ASCII rather than Unicode, or find a matching Unicode library for the Quark functions.

                    R Offline
                    R Offline
                    robsons2007
                    wrote on last edited by
                    #9

                    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

                    L 1 Reply Last reply
                    0
                    • R robsons2007

                      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

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #10

                      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.)?[^].

                      R 1 Reply Last reply
                      0
                      • L Lost User

                        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.)?[^].

                        R Offline
                        R Offline
                        robsons2007
                        wrote on last edited by
                        #11

                        thanks for the help friend

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups