Results 1 to 6 of 6
-
August 30th, 2007, 10:33 AM #115Registered User
posts
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!
-
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.If you notice this notice you will notice that this notice is not worth noticing.
"Are you doing anything tonight? If not, how about me?"
Opera Sucks! - FIX IT
Oliver Zheng
-
June 3rd, 2008, 05:47 PM #31Registered User
postsJust 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;
postsglut.lib glut32.lib
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:
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.Code:#pragma comment( lib, "mystaticlib" )
-
August 11th, 2008, 09:30 PM #6158Code Monkey
postsNot getting answers? Read this!

Reply With Quote


Bookmarks