Adding .lib's
Okay, before anyone says it, I know you can go to project-settings e.t.c e.t.c e.t.c, and that you can #pragma comment(lib, "libname.lib")
My problem is, the lib file I''m trying to link in is in a subfolder (maincode/engine/virtual/zip.lib) and I''m trying to link it into the virtual file system code (maincode/engine/virtual/thisfile.cpp) using pragma comment.
The problem is.... it doesnt seem to find it (because it''s not in my list of directories for MSVC to automatically check).
I''m trying to avoid adding the folder to the MSVC lib section, and instead link it in directly by pointing to it. The lib is in the same folder as the virtual file system code, so I just linked it the normal way, as "zip.lib", but it doesnt find it. (it''s only looking in the MSVC lib folders bit).
So my question is..... is there a way to point to a lib to link in without putting it in the project-settings-links tab, and without adding it to the tools-options-directories tab.
Any ideas?
Nope.
Think about it. You want to include a library, but you''re refusing to tell MSVC where to find it. How should it know?
It can''t search the drive, what if there are two with the same filename?
Just put the directory in the directories tab.
Think about it. You want to include a library, but you''re refusing to tell MSVC where to find it. How should it know?
It can''t search the drive, what if there are two with the same filename?
Just put the directory in the directories tab.
lol... quitter! hehehe (just playing).
Dont worry, I solved it... it was so obvious it''s almost mind-numbing.
Just add it to the project.
Project ->Add To Project -> Files
et voila.
Thx anyway :D
Dont worry, I solved it... it was so obvious it''s almost mind-numbing.
Just add it to the project.
Project ->Add To Project -> Files
et voila.
Thx anyway :D
quote:Original post by Cobra
lol... quitter! hehehe (just playing).
Dont worry, I solved it... it was so obvious it''s almost mind-numbing.
Just add it to the project.
Project ->Add To Project -> Files
et voila.
Thx anyway :D
I knew that way, and if you check your project file, you''ll see it hardcoded the paths (C:\..\..\whatever.lib)
Try moving your project to a different place on your drive and see if it still works.
Actually... its not in any of the project-settings harcoded paths.... and if I check the properties of the lib that's added in MSVC, it says..
".\engine code\virtual\zip.lib"
.... which is nice :D
EDIT : almost forgot to mention that it works no matter where I move it... I'd advise people do this rather than have all their project directories in MSVC lib lists :/
[edited by - Cobra on May 7, 2002 11:12:28 AM]
".\engine code\virtual\zip.lib"
.... which is nice :D
EDIT : almost forgot to mention that it works no matter where I move it... I'd advise people do this rather than have all their project directories in MSVC lib lists :/
[edited by - Cobra on May 7, 2002 11:12:28 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement