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 with .lib for STD::COUT

Help with .lib for STD::COUT

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++tutorialquestionannouncement
7 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.
  • F Offline
    F Offline
    ForNow
    wrote on last edited by
    #1

    Hi While trying to get a better understanding of my exceptions I down loaded the demo "

    Quote:

    How a C++ compiler implements exception handling

    Well first I feel very good the I spent $700 to get the intel C/C++ compiler the demo had inline asm code and the Microsoft compiler only supports thunder 32 bit code but intel supports _asm with X64 I changed the "E" register to "R" Was able to build everything until the demo I got a number of externs I paste just one example but I am sire they are all related to cout

    Quote:

    error LNK2019: unresolved external symbol "public: __cdecl std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QEAA@H@Z) referenced in function "public: void __cdecl std::_Container_base12::_Orphan_all(void)" (?_Orphan_all@_Container_base12@std@@QEAAXXZ) 1>MyExcHandler.lib(myexchandler.obj) : error LNK2001: unresolved external symbol "public: __cdecl std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QEAA@H@Z)

    doing research seems the .lib msvcprtd or msvcprt.lib for release ( did a dumpbin on the lib) I included in my library directories however I am still getting externals

    L L 3 Replies Last reply
    0
    • F ForNow

      Hi While trying to get a better understanding of my exceptions I down loaded the demo "

      Quote:

      How a C++ compiler implements exception handling

      Well first I feel very good the I spent $700 to get the intel C/C++ compiler the demo had inline asm code and the Microsoft compiler only supports thunder 32 bit code but intel supports _asm with X64 I changed the "E" register to "R" Was able to build everything until the demo I got a number of externs I paste just one example but I am sire they are all related to cout

      Quote:

      error LNK2019: unresolved external symbol "public: __cdecl std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QEAA@H@Z) referenced in function "public: void __cdecl std::_Container_base12::_Orphan_all(void)" (?_Orphan_all@_Container_base12@std@@QEAAXXZ) 1>MyExcHandler.lib(myexchandler.obj) : error LNK2001: unresolved external symbol "public: __cdecl std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QEAA@H@Z)

      doing research seems the .lib msvcprtd or msvcprt.lib for release ( did a dumpbin on the lib) I included in my library directories however I am still getting externals

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

      If these externals are related to std::cout then they should automatically get resolved by the STL libraries, which generally get automatically included in your project. However, since you are using the Intel compiler, it may be that you need to include some extra libraries that Intel provides.

      1 Reply Last reply
      0
      • F ForNow

        Hi While trying to get a better understanding of my exceptions I down loaded the demo "

        Quote:

        How a C++ compiler implements exception handling

        Well first I feel very good the I spent $700 to get the intel C/C++ compiler the demo had inline asm code and the Microsoft compiler only supports thunder 32 bit code but intel supports _asm with X64 I changed the "E" register to "R" Was able to build everything until the demo I got a number of externs I paste just one example but I am sire they are all related to cout

        Quote:

        error LNK2019: unresolved external symbol "public: __cdecl std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QEAA@H@Z) referenced in function "public: void __cdecl std::_Container_base12::_Orphan_all(void)" (?_Orphan_all@_Container_base12@std@@QEAAXXZ) 1>MyExcHandler.lib(myexchandler.obj) : error LNK2001: unresolved external symbol "public: __cdecl std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QEAA@H@Z)

        doing research seems the .lib msvcprtd or msvcprt.lib for release ( did a dumpbin on the lib) I included in my library directories however I am still getting externals

        L Offline
        L Offline
        leon de boer
        wrote on last edited by
        #3

        Are you absolutely sure you did the Linker >> Input >> Additional Dependencies right? That looks suspiciously like what it is telling you or it's static versus dynamic linking but that usually presents slightly different.

        In vino veritas

        F 1 Reply Last reply
        0
        • L leon de boer

          Are you absolutely sure you did the Linker >> Input >> Additional Dependencies right? That looks suspiciously like what it is telling you or it's static versus dynamic linking but that usually presents slightly different.

          In vino veritas

          F Offline
          F Offline
          ForNow
          wrote on last edited by
          #4

          Thanks I had downloaded the sample code "How the compiler implements exception handling" Seems like SEH is only use full for 32 bit code as the EXCEPTION_REGISTRATION handler pointer is a DD 4 bytes and I am running a 64 bit project

          L 1 Reply Last reply
          0
          • F ForNow

            Thanks I had downloaded the sample code "How the compiler implements exception handling" Seems like SEH is only use full for 32 bit code as the EXCEPTION_REGISTRATION handler pointer is a DD 4 bytes and I am running a 64 bit project

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

            ForNow wrote:

            Seems like SEH is only use full for 32 bit code as the EXCEPTION_REGISTRATION handler pointer is a DD 4 bytes and I am running a 64 bit project

            No absolutely not, That field should be defined as a PEXCEPTION_ROUTINE callback which will be quadword pointer on a 64 bit platform. Sounds like you are looking at some 32 bit instructions in your sample. Best Wishes, -David Delaune

            F 1 Reply Last reply
            0
            • L Lost User

              ForNow wrote:

              Seems like SEH is only use full for 32 bit code as the EXCEPTION_REGISTRATION handler pointer is a DD 4 bytes and I am running a 64 bit project

              No absolutely not, That field should be defined as a PEXCEPTION_ROUTINE callback which will be quadword pointer on a 64 bit platform. Sounds like you are looking at some 32 bit instructions in your sample. Best Wishes, -David Delaune

              F Offline
              F Offline
              ForNow
              wrote on last edited by
              #6

              Thanks this is in regards to the exception I'm getting access violation it happens intermittently When it does the Debbuger gets control and points to ntdll looking at the call stack doesn't point me back to anywhere in my code. I was looking for a really low level Exception handler that might catch it earlier. The code for the SEH in all the examples I have seen has inline Assembler However I do have the intel compiler which lets me use _asm for 64 bit code Thanks

              1 Reply Last reply
              0
              • F ForNow

                Hi While trying to get a better understanding of my exceptions I down loaded the demo "

                Quote:

                How a C++ compiler implements exception handling

                Well first I feel very good the I spent $700 to get the intel C/C++ compiler the demo had inline asm code and the Microsoft compiler only supports thunder 32 bit code but intel supports _asm with X64 I changed the "E" register to "R" Was able to build everything until the demo I got a number of externs I paste just one example but I am sire they are all related to cout

                Quote:

                error LNK2019: unresolved external symbol "public: __cdecl std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QEAA@H@Z) referenced in function "public: void __cdecl std::_Container_base12::_Orphan_all(void)" (?_Orphan_all@_Container_base12@std@@QEAAXXZ) 1>MyExcHandler.lib(myexchandler.obj) : error LNK2001: unresolved external symbol "public: __cdecl std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QEAA@H@Z)

                doing research seems the .lib msvcprtd or msvcprt.lib for release ( did a dumpbin on the lib) I included in my library directories however I am still getting externals

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

                Hi, The unresolved symbol std::_Lockit appears to be from the Microsoft implementation of checked iterators[^] in our STL implementation. So this implies that you are #including the Microsoft STL headers and trying to link with the Intel Standard C++ Library[^]. Fix your broken #include and library paths. Best Wishes, -David Delaune

                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