Home > Enterprise >  How do I specify additional directories for a linker in a cl compiler
How do I specify additional directories for a linker in a cl compiler

Time:11-28

I use the cl /EHsc fileName.cpp command in powershell to compile cpp files, and the thing is I cannot find on the web how to specify the paths to additional dependencies for a linker to know where to look for lib files. Same goes with headers

CodePudding user response:

It's right there in the documentation.

cl /I c:\myheaders /I ..\onemore mycode.c /link /LIBPATH:.\foo /LIBPATH:c:\bar
  • Related