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

1.1k views Asked by At

recently I started to use WSL & vcpkg, but it has some problems when mixing windows + linux development. 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". (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.

Does Anyone already encountered this problem?

Am I doing something wrong?

Is there a better way to develop a cross-platform project?

Thanks

1

There are 1 answers

1
guy On

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 can work on the windows filesystem with /mnt/)

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).

this is my original post in the Github: https://github.com/microsoft/vcpkg/issues/13948#issuecomment-706625438