How to add an external static library to a Visual C++ 2010 Express project

Sureshot324

Diamond Member
Feb 4, 2003
3,370
0
71
I can't believe I'm having such a hard time figuring out how to do something so simple. I have an external library (including a .lib and .h file) that I want to add to my project. From what I've read I need to go Project>Properties>Framework and references>Add new References and add it there.

However, this window is blank. There is a Project name and Project Directory column but there is nothing there and no 'browse' button to find my library. I tried going to VC++ directory and adding the path to the .lib file to the libraries path but it didn't help.

What am I missing?
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,578
4,492
75
I just had this problem today myself. In Tools -> Options, under Projects and Solutions, you'll find VC++ Directories. At least that's how it is in VS2008. Select Libraries and add your path there. Then you can add the library filename only where you expected to add it.

Edit: Also, don't forget to add the header directory to the headers section.

Messy, isn't it? D: