Search code examples
c++visual-studiobuildlinker

How to add all the folders under `/lib` to "Additional Library Directories" in visual studio 2019


I have a folder path /lib. In it there is /lib/A/a.lib, /lib/B/b.lib, /lib/C/c.lib, .../lib/Z/z.lib. When I just put /lib in "Additional Library Directories", the linker cannot find a.lib, b.lib, ..., z.lib. It seems the linker will just search '/lib'. So how to make the linker search all the folders under /lib to find the libraries? I just do not want to add the library path one by one.


Solution

  • Unfortunately, you couldn't add all the folders under /lib to “Additional Library Directories”. You could only add the library path one by one.