Results 1 to 6 of 6
August 30th, 2007, 10:33 AM #115Registered User
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
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!
August 30th, 2007, 06:01 PM #2
.lib is a library. A library is used for linking when you compile your project. As you said, it is a static library and compiled into your program. A .dll is a dynamic load library, which is loaded at runtime.
If you want to link with this static library, go to the project properties, under linking, add the link to this file.
June 3rd, 2008, 05:47 PM #31Registered User
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
June 4th, 2008, 04:55 AM #41,627hugeExplosions = true;
gogogogo OGL!MS Paint FTW!
June 28th, 2008, 04:14 PM #5
to link a lib dont bother with messing with the project file and use:
#pragma comment( lib, "mystaticlib" )
August 11th, 2008, 09:30 PM #6158Code Monkey
postsNot getting answers? Read this!