简体   繁体   English

如何使用相同的 vcpkg 目录使用 WSL2 和 Visual Studio C++ 2019 开发 Linux + Windows 应用程序?

[英]How to develop Linux + Windows application with WSL2 and Visual Studio C++ 2019 using the same vcpkg dir?

recently I started to use WSL & vcpkg, but it has some problems when mixing windows + linux development.最近开始用WSL&vcpkg,但是在windows+linux混开发的时候出现了一些问题。 It seems like that installing Linux packages or Windows packages with vcpkg, mutually damage the vcpkg configuration and then vcpkg roughly says: "the package you want to install doesn't exist".好像用vcpkg安装Linux包或者Windows包,互相破坏了vcpkg配置,然后vcpkg粗略地说:“你要安装的包不存在”。 (I know for sure that it exist) (我确定它存在)

If it matters, the project is located in the windows "world" so the WSL directing to it with /mnt/c/Users//workspace/proj1 but it really doesn't matter.如果重要的话,该项目位于 Windows“世界”中,因此 WSL 使用 /mnt/c/Users//workspace/proj1 指向它,但这真的无关紧要。

Does Anyone already encountered this problem?有没有人遇到过这个问题?

Am I doing something wrong?难道我做错了什么?

Is there a better way to develop a cross-platform project?有没有更好的方法来开发跨平台项目?

Thanks谢谢

So I post it to help anyone who have doubts about it: Don't mix WSL project with windows project because it will force you to work on the windows filesystem from WSL.所以我发布它以帮助任何对此有疑问的人:不要将 WSL 项目与 Windows 项目混合,因为它会迫使您从 WSL 处理 Windows 文件系统。 (WSL can work on the windows filesystem with /mnt/) (WSL 可以使用 /mnt/ 在 windows 文件系统上工作)

anyway, It will both corrupt the vcpkg and the overall compile times will be horribly slow from linux filesystem (usually ext4) to the windows filesystem (NTFS).无论如何,它都会破坏 vcpkg 并且从 linux 文件系统(通常是 ext4)到 windows 文件系统(NTFS)的整体编译时间会非常慢。

this is my original post in the Github: https://github.com/microsoft/vcpkg/issues/13948#issuecomment-706625438这是我在 Github 上的原始帖子: https : //github.com/microsoft/vcpkg/issues/13948#issuecomment-706625438

暂无
暂无

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

相关问题 如何在Visual Studio 2017中创建C ++ Windows桌面应用程序? - How to create c++ windows desktop application in visual studio 2017? 如何在Visual Studio C ++ 2012中添加Windows Forms应用程序 - How to add Windows Forms Application in visual studio c++ 2012 如何在 Windows 上的 Visual Studio 2019 for C++ 中下载、构建和包含 PDCurses - How to download, build and include PDCurses in Visual Studio 2019 for C++ on Windows 如何在 Visual Studio 2019 中将 Windows 终端用作 C++ 项目的调试器控制台 - How to use Windows Terminal as Debugger console in Visual Studio 2019 for C++ Project 如何在 Visual Studio 2019 C++ 移动应用程序中打开 AVD Manager? - How do I open AVD Manager in Visual Studio 2019 C++ mobile application? Codeforces 上的编译错误,使用 MS Visual Studio 2019 C++ - Compilation errors on Codeforces, using MS visual studio 2019 C++ 如何更改 Visual Studio 2019 中的默认 C++ 语言标准? - How to change default C++ language standard in Visual Studio 2019? C ++和Visual Studio 2008,如何开发以下Web提取应用程序? 最后一般性问题的跟进 - C++ and Visual Studio 2008, how to develop the following web extracting application? Follow-up of last general question 如何在 Visual Studio 中查看使用 vcpkg 安装的文件的定义? - How to see definitions in Visual Studio for files installed using vcpkg? 在Visual Studio,Visual C ++ MFC应用程序中使用tinyxml2 - Using tinyxml2 with a Visual Studio, Visual C++ MFC Application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM