Studio : Visual C++ Adding (.lib) refrence!?

Using visual studio:

I created a static library in visual c++ which produces mystaticlib.lib

I want to use this lib in another program also written in visual C++.

When using the Browse add new refrence dialogue in visual stuido you may only select from the following file types:

.dll, tlb, ocx, olb, exe

wtf?

One way to accomplish this is by creating the second project as part of the same solution and using the projects dialogue. But this is undesireable! :frowning:

Just go to project properties -> Configuration properties -> Linker.
Goto to ->General and set the "Additional Library directories" to point to your lib file directory.

Then goto to Linker -> **Input **and type in your lib file name e.g. mystaticlib.lib in the "Additional Dependencies" field

glut.lib glut32.lib

gogogogo OGL! :smiley:

to link a lib dont bother with messing with the project file and use:

#pragma comment( lib, "mystaticlib" )

so in case you want to use the same file in another project you can just include it without having to change the project file also.