问题
To use some recompiled libraries (f.ex. boost chrono) i need to specify the library folder in visual studio at Properties -> VC++ Directories -> Library Directories. How can i achieve this using the command line? I have been using the /LIBPATH but i get linker error (LNK1104).
回答1:
You need to specify /link <linkoptions> for cl.exe command line to pass the required settings to the linker:
cl -I "path\to\Boost" test.cpp /link /LIBPATH:"C:\path\to\Boost\stage\lib"
来源:https://stackoverflow.com/questions/12124739/visual-c-library-directories-command-line-equivalent