简体   繁体   English

另一台 PC 上的 Visual Studio C++ 项目无法构建

[英]Visual Studio C++ project on another PC fails to build

Tested with the following setup:使用以下设置进行测试:

  • Home - VS2017 or VS2019主页 - VS2017 或 VS2019
  • Classroom - VS2013 or VS2015.课堂 - VS2013 或 VS2015。

I do code at home, then copy to my flash drive, bring it to the classroom and open a project from their PCs.我在家里编写代码,然后复制到我的闪存驱动器,将其带到教室并从他们的 PC 上打开一个项目。 Upon compilation I receive a big list of errors accessing standard header files, similar to this .编译时,我收到一大串访问标准头文件的错误列表,类似于这个. Happens to me with every project I create at home, and the other way around: from the classroom to home PC.我在家创建的每个项目都会发生在我身上,反之亦然:从教室到家用 PC。

This is something that doesn't happen with C# projects, which only ask me to change the .net framework version before opening, everything works fine here.这是 C# 项目不会发生的事情,它只要求我在打开之前更改 .net 框架版本,这里一切正常。

If you created a project in VS2013 and try to open it in VS2017 or VS2019 you might need additional changes.如果您在 VS2013 中创建了一个项目并尝试在 VS2017 或 VS2019 中打开它,您可能需要进行其他更改。

Check this out- https://docs.microsoft.com/en-us/visualstudio/porting/port-migrate-and-upgrade-visual-studio-projects?view=vs-2019看看这个 - https://docs.microsoft.com/en-us/visualstudio/porting/port-migrate-and-upgrade-visual-studio-projects?view=vs-2019

If you created a project in the latest version say VS2019, it is very difficult to open it in older versions such as VS2013.如果你在最新版本中创建了一个项目,比如VS2019,那么在VS2013等旧版本中打开它是非常困难的。

要修复它,请将 Omnipath 设置为最新的 vscode 设置

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

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