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. Link error using

Link error using

Scheduled Pinned Locked Moved C / C++ / MFC
visual-studiographicshelpquestion
13 Posts 2 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.
  • J jimNLX

    this is the error: error LNK2001: unresolved external symbol "class std::basic_string using std:: At this point VS gives me a short list that doesn't look like the string class. It shows: _Bool_allocator _Vbase _VBITS vector Vector Any idea on why I'm not getting the right class? Thanks, Jim

    J Offline
    J Offline
    Jun Du
    wrote on last edited by
    #2

    Should it be:

    using namespace std;

    - It's easier to make than to correct a mistake.

    J 1 Reply Last reply
    0
    • J Jun Du

      Should it be:

      using namespace std;

      - It's easier to make than to correct a mistake.

      J Offline
      J Offline
      jimNLX
      wrote on last edited by
      #3

      I still get the same error when I use this...

      J 1 Reply Last reply
      0
      • J jimNLX

        I still get the same error when I use this...

        J Offline
        J Offline
        Jun Du
        wrote on last edited by
        #4

        It usually has something to do with linked libraries. What compiler are you using? What runtime library settings are you using? Have you tried a Rebuild All? - It's easier to make than to correct a mistake.

        J 1 Reply Last reply
        0
        • J Jun Du

          It usually has something to do with linked libraries. What compiler are you using? What runtime library settings are you using? Have you tried a Rebuild All? - It's easier to make than to correct a mistake.

          J Offline
          J Offline
          jimNLX
          wrote on last edited by
          #5

          I have rebuilt everything many times. I'm using ../vc98/lib and ../vc98/mfc/lib I'm compliling with Visual C++ 6.0 Thanks for the help, I'm really lost on how to debug this.. Jim

          J 1 Reply Last reply
          0
          • J jimNLX

            I have rebuilt everything many times. I'm using ../vc98/lib and ../vc98/mfc/lib I'm compliling with Visual C++ 6.0 Thanks for the help, I'm really lost on how to debug this.. Jim

            J Offline
            J Offline
            Jun Du
            wrote on last edited by
            #6

            I mean what C/C++ run-time libraries you are linking. Could you add "msvcprt.lib" to the additional libraries? - It's easier to make than to correct a mistake.

            J 1 Reply Last reply
            0
            • J Jun Du

              I mean what C/C++ run-time libraries you are linking. Could you add "msvcprt.lib" to the additional libraries? - It's easier to make than to correct a mistake.

              J Offline
              J Offline
              jimNLX
              wrote on last edited by
              #7

              msvcprt.lit wasn't in the additional libraries so I added it and re-compiled everything and still received the same errors. this is the whole error, it may help: error LNK2001: unresolved external symbol "class std::basic_string,class std::allocator > __cdecl GetConfiguredClientTypes(class std::vector,class std::allocator >,class std::allocator,class std::allocator > > > *)" (?GetConfiguredClientTypes@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAV ?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@2@@Z) thanks again!

              J 1 Reply Last reply
              0
              • J jimNLX

                msvcprt.lit wasn't in the additional libraries so I added it and re-compiled everything and still received the same errors. this is the whole error, it may help: error LNK2001: unresolved external symbol "class std::basic_string,class std::allocator > __cdecl GetConfiguredClientTypes(class std::vector,class std::allocator >,class std::allocator,class std::allocator > > > *)" (?GetConfiguredClientTypes@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAV ?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@2@@Z) thanks again!

                J Offline
                J Offline
                Jun Du
                wrote on last edited by
                #8

                Could you check two things: 1) Whick one of the following appears in your linker settings: /ML /MT /MD /MLd /MTd /MDd Let me know if more than one are being used. 2) Does your app load any other modules (DLLs)? - It's easier to make than to correct a mistake.

                J 1 Reply Last reply
                0
                • J Jun Du

                  Could you check two things: 1) Whick one of the following appears in your linker settings: /ML /MT /MD /MLd /MTd /MDd Let me know if more than one are being used. 2) Does your app load any other modules (DLLs)? - It's easier to make than to correct a mistake.

                  J Offline
                  J Offline
                  jimNLX
                  wrote on last edited by
                  #9

                  /MLd is the only one I saw in there. The app does load 1 DLL*****I take that back, it doesn't link to a dll -- modified at 13:32 Thursday 15th June, 2006

                  J 1 Reply Last reply
                  0
                  • J jimNLX

                    /MLd is the only one I saw in there. The app does load 1 DLL*****I take that back, it doesn't link to a dll -- modified at 13:32 Thursday 15th June, 2006

                    J Offline
                    J Offline
                    Jun Du
                    wrote on last edited by
                    #10

                    If you've set /nodefaultlibs, try to scrap it. - It's easier to make than to correct a mistake.

                    J 1 Reply Last reply
                    0
                    • J Jun Du

                      If you've set /nodefaultlibs, try to scrap it. - It's easier to make than to correct a mistake.

                      J Offline
                      J Offline
                      jimNLX
                      wrote on last edited by
                      #11

                      haven't set that.

                      J 1 Reply Last reply
                      0
                      • J jimNLX

                        haven't set that.

                        J Offline
                        J Offline
                        jimNLX
                        wrote on last edited by
                        #12

                        Anybody else have any ideas on where to go from here? It really seems like the info from is getting stepped on or something. Help I'm totally stuck!! Thanks, Jim

                        J 1 Reply Last reply
                        0
                        • J jimNLX

                          Anybody else have any ideas on where to go from here? It really seems like the info from is getting stepped on or something. Help I'm totally stuck!! Thanks, Jim

                          J Offline
                          J Offline
                          jimNLX
                          wrote on last edited by
                          #13

                          Would it make a difference that I have both C & CPP files in this project?

                          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