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. How to add reference of a dll in a Visual Studio Project

How to add reference of a dll in a Visual Studio Project

Scheduled Pinned Locked Moved C / C++ / MFC
csharpvisual-studiotutorialquestion
7 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.
  • P Offline
    P Offline
    pandit84
    wrote on last edited by
    #1

    Hi , I have created a .DLL in one solution and I am trying to use that .dll in another solution. In Visual Studio 2010 if I want to use same .DLL in the same Solution in which it was created , then I can do "Add->References->Configuratio~->Project" But when I try to use this .DLL in another solution I cannt see .DLL in the "Project" tab. How can I add reference to dll which is in another solution. MSDN shows the way for adding references of dll only for those which are in same solution.

    N _ 2 Replies Last reply
    0
    • P pandit84

      Hi , I have created a .DLL in one solution and I am trying to use that .dll in another solution. In Visual Studio 2010 if I want to use same .DLL in the same Solution in which it was created , then I can do "Add->References->Configuratio~->Project" But when I try to use this .DLL in another solution I cannt see .DLL in the "Project" tab. How can I add reference to dll which is in another solution. MSDN shows the way for adding references of dll only for those which are in same solution.

      N Offline
      N Offline
      Nitheesh George
      wrote on last edited by
      #2

      Hi, You can add the existing project to your solution and then add the lib of that dll project in linker options of the project you want add a reference. Hope this helps Nitheesh Nitheesh George http://www.simpletools.co.in

      1 Reply Last reply
      0
      • P pandit84

        Hi , I have created a .DLL in one solution and I am trying to use that .dll in another solution. In Visual Studio 2010 if I want to use same .DLL in the same Solution in which it was created , then I can do "Add->References->Configuratio~->Project" But when I try to use this .DLL in another solution I cannt see .DLL in the "Project" tab. How can I add reference to dll which is in another solution. MSDN shows the way for adding references of dll only for those which are in same solution.

        _ Offline
        _ Offline
        _Superman_
        wrote on last edited by
        #3

        Use the Browse tab and add the reference from the folder of the other solution.

        «_Superman_»  _I love work. It gives me something to do between weekends.

        _Microsoft MVP (Visual C++)

        Polymorphism in C

        P 1 Reply Last reply
        0
        • _ _Superman_

          Use the Browse tab and add the reference from the folder of the other solution.

          «_Superman_»  _I love work. It gives me something to do between weekends.

          _Microsoft MVP (Visual C++)

          Polymorphism in C

          P Offline
          P Offline
          pandit84
          wrote on last edited by
          #4

          "Browse" is not available in visual studio for a C++ Projects.

          _ L 2 Replies Last reply
          0
          • P pandit84

            "Browse" is not available in visual studio for a C++ Projects.

            _ Offline
            _ Offline
            _Superman_
            wrote on last edited by
            #5

            For unmanaged C++ projects, you add a DLL reference as mentioned by Nitheesh George. Open Project -> Properties -> Configuration Properties -> Linker -> Input. Enter the name of the LIB file corresponding to the DLL in the Additional Dependencies text box.

            «_Superman_»  _I love work. It gives me something to do between weekends.

            _Microsoft MVP (Visual C++)

            Polymorphism in C

            1 Reply Last reply
            0
            • P pandit84

              "Browse" is not available in visual studio for a C++ Projects.

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

              In addition to what Superman said, be sure that the DLL is in the library search path used by Windows so it can be found when your program runs.

              I must get a clever new signature for 2011.

              P 1 Reply Last reply
              0
              • L Lost User

                In addition to what Superman said, be sure that the DLL is in the library search path used by Windows so it can be found when your program runs.

                I must get a clever new signature for 2011.

                P Offline
                P Offline
                pandit84
                wrote on last edited by
                #7

                Thanks a lot . I tried by setting System environment variable,added Library include & Additional dependency and it solved my issue .

                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