简体   繁体   中英

MsBuild can't find lib

I am using the following script to build a C++ project:

msbuild D:\proj.vcxproj /p:Configuration="Release" /p:Platform="x64" /p:BuildProjectReferences=false /p:AssemblySearchPaths="D:\Import\GenericAIC\Include" /p:AdditionalLibPaths="D:\Export\Release"

I am getting an error that it can't find a certain lib. that lib is present in the D:\\Export\\Release folder which is set as p:AdditionalLibPaths

The project compiles perfectly in Visual studio.

Any thoughts?

Since you are building a project and not a solution,
you don't have the $SolutionDir , and MSBuild cant interpert all the macros in the project file.
you just need to add /Property:SolutionDir="" and everything will compile.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM