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. using a .lib file

using a .lib file

Scheduled Pinned Locked Moved C / C++ / MFC
question
6 Posts 4 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
    FASTian
    wrote on last edited by
    #1

    How do use lib file. Do i just have to declare the lib name in the link tab. How do i get the function names that are exposed by the library??

    N 1 Reply Last reply
    0
    • F FASTian

      How do use lib file. Do i just have to declare the lib name in the link tab. How do i get the function names that are exposed by the library??

      N Offline
      N Offline
      Nirav Doshi
      wrote on last edited by
      #2

      Instead of putting it in the link tab, you can also use: #pragma comment(lib, "libfile") I suppose, if you have the DLL of the LIB file, you can view the dependencies from the "Depends" Visual Studio tool. It will list the functions exported. Hope this helps. * Don't wish it was easier, wish you were better! *

      F 1 Reply Last reply
      0
      • N Nirav Doshi

        Instead of putting it in the link tab, you can also use: #pragma comment(lib, "libfile") I suppose, if you have the DLL of the LIB file, you can view the dependencies from the "Depends" Visual Studio tool. It will list the functions exported. Hope this helps. * Don't wish it was easier, wish you were better! *

        F Offline
        F Offline
        FASTian
        wrote on last edited by
        #3

        Actually the project did not make any dll file....i have the complete code for the lib project. The project compiles ok no errors there. Only when i add the lib file to the project and try to call the global function for that lib then i get loads of unresolved symbols errors. Any ideas how to deal with this or what i am doing wrong here. Thanks

        D 1 Reply Last reply
        0
        • F FASTian

          Actually the project did not make any dll file....i have the complete code for the lib project. The project compiles ok no errors there. Only when i add the lib file to the project and try to call the global function for that lib then i get loads of unresolved symbols errors. Any ideas how to deal with this or what i am doing wrong here. Thanks

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          FASTian wrote: ...i get loads of unresolved symbols errors. Any ideas how to deal with this or what i am doing wrong here. The exported function is not being called correctly. Make sure C++'s name mangling is not biting you.


          "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

          I 1 Reply Last reply
          0
          • D David Crow

            FASTian wrote: ...i get loads of unresolved symbols errors. Any ideas how to deal with this or what i am doing wrong here. The exported function is not being called correctly. Make sure C++'s name mangling is not biting you.


            "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

            I Offline
            I Offline
            imposterrific
            wrote on last edited by
            #5

            I'm curiuos about this too. Could you expound upon "name mangling" and how to avoid it?

            D 1 Reply Last reply
            0
            • I imposterrific

              I'm curiuos about this too. Could you expound upon "name mangling" and how to avoid it?

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              Try this search.


              "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

              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