shah
shah

Reputation: 1

How do I add a C library to a Microsoft Visual C++ project?

I am working on a project in Microsoft Visual C++. I want to add the USB device driver library which is a C library.

Do I need to build some extra library to add this USB library?

Upvotes: 0

Views: 310

Answers (1)

jonsca
jonsca

Reputation: 10381

Go to the project menu, then properties, configuration properties tab

  • at C/C++, general, put the header file directory in "Additional Include Directories"
  • in Linker, general, add the directory that the .lib files are in to "Additional Library Directories"
  • in Linker, input, add the names of the .lib files to "Additional Dependencies"

Compile you program, and if necessary, copy any .dlls you will need to the directory containing the .exe

Upvotes: 1

Related Questions