简体   繁体   English

MsBuild无法找到lib

[英]MsBuild can't find lib

I am using the following script to build a C++ project: 我使用以下脚本来构建C ++项目:

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. 我收到一个错误,它无法找到某个lib。 that lib is present in the D:\\Export\\Release folder which is set as p:AdditionalLibPaths lib存在于D:\\Export\\Release folder ,该D:\\Export\\Release folder设置为p:AdditionalLibPaths

The project compiles perfectly in Visual studio. 该项目在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. 你没有$ SolutionDir ,并且MSBuild无法插入项目文件中的所有宏。
you just need to add /Property:SolutionDir="" and everything will compile. 你只需要添加/ Property:SolutionDir =“”,一切都会编译。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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