I have a folder in my project directory where I put all of the libraries I'm using, this folder has subdirectories for each library, where the .lib files reside. I have added this folder to the project lib search folders, but it can't seem to find the library when I at the library to the project in the form of:
LibSubFolder/Lib.lib;
If I move the lib out into the main folder and then just include Lib.lib; that works, or if I change the lib search folder setting to point to the actual sub folder of the lib then that also works, finding the lib in that sub folder...
So its like I just can't have sub directories in my library name when adding it to the library input in the project settings? its very weird as I swear this has been fine in older visual studio
My project is just on my C drive so its not a matter of paths being too long. I am using Visual C++ 2010 with service pack 1 installed as part of Visual Studio 2010 Premium
Only Visual studio 2012 support LibSubFolder/Lib.lib
.
A simple test:
test.exe:test.cc
cl /c /IE:\tmp\TestLIB\TestLIB test.cc
link /LIBPATH:E:\ test.obj tmp\testlib.lib
Both Visual Studio 2008 and 2010 give error:
cannot open file tmp\\testlib.lib
PS: the testlib.lib is in the folder e:\\tmp
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.