14

I have a problem. I place my .DLL and .LIB file in the same directory as my project, go to Properties -> Common Properties -> Framework and References -> Add New Reference. But the list comes up empty.

Is there something else I should be doing?

Ajay
  • 18,086
  • 12
  • 59
  • 105
sdasdadas
  • 23,917
  • 20
  • 63
  • 148
  • Which list comes up empty? What you are trying (and failing) to do? – Ajay Aug 21 '11 at 04:55
  • I am trying to use FMOD's .dll file. The list that should contain the libraries to add comes up empty. – sdasdadas Aug 21 '11 at 04:58
  • What you can do is select the dll from another folder and VS will automatically make a copy in your build folder. Also are you in the correct menu for adding a dll as a reference? – Jesus Ramos Aug 21 '11 at 04:58
  • I believe so... I am following this guide: http://msdn.microsoft.com/en-us/library/ms235636%28v=VS.100%29.aspx I also don't know how to select it for another folder since it seems like I cannot find it at all. (This is my first time doing anything with .dlls) – sdasdadas Aug 21 '11 at 05:01

1 Answers1

25

C++ is not C#. You don't include .dlls in C++ applications by adding "references". Unless it's C++/CLI, but that's not C++.

In C++, you would go, in the project configuration, to Linker->Input->Additional Dependencies. There, you would list the library name plus path to the .lib in question.

Normally, when you build a Windows C/C++ DLL, you also get a .lib. This is an import library; users of the library include (as stated above) that .lib in order to access the DLL. They generally do not load the .dll directly (though there are ways to do that).

Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982