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

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

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

Related

nvm with WSL for projects stored in Windows

I'm struggling to understand how exactly WSL works.
The training that I'm doing requires nvm so I can manage my node versions in my project, located in my hard drive that is running with Windows.
So, in order to use nvm I need WSL, but I cannot comprehend where it is located. As far as I understood (and I'm pretty sure that I'm wrong) the WSL that I installed is like a Linux VM, completely independent from my Windows, and I operate it through the Ubuntu Terminal that came with WSL. If that's the case, how can nvm in WSL be useful if my project is in my Windows directory and the WSL controls node versions from my Linux VM?
How do I make nvm useful for my project running from my C:\ drive and how does WSL work with nvm in my Windows?
Thank you!
A few options, but each has advantages and disadvantages:
If your Node/JavaScript files are on your Windows C:\ drive, then you do have the ability to access that from WSL. Windows paths are automatically mounted and accessible in WSL via /mnt/c, /mnt/d, etc.
So if you have your JS source in, for example:
C:\Users\<myusername>\Documents\Projects\JS_class\project1\
Then that would be accessible under Ubuntu in WSL via:
/mnt/Users/<myusername>/Documents/Projects/JS_class/project1/
The disadvantage here is performance, as mentioned in this question.
Alternatively, you can store your project files inside WSL. You can access the WSL path from Windows by using \\wsl$\Ubuntu\home\<yourusername>\ (or similar). You can use this to copy from your existing Windows drive to your WSL distribution.
Advantage: Faster. Disadvantage: Unknown -- You seem to want the files to be in Windows, but I'm not sure why.
Or you can use WSL1 for most Node/JS tasks. See the previously mentioned answer for details on how to convert.
Advantage: Speed
Disadvantage: WSL1 hasn't been updated in a while, and is started to run into some compatibility issues. It's still popular enough and stable enough at the moment for me to continue to recommend it, though.
There's also a Windows version of nvm as well as a replacement project that the repo there mentions. I cannot personally speak for the quality of it, but it does have 23k stars on Github. Note that it is not affiliated with the original (Linux-based) nvm project.

How can i use a pre installed Intellij Idea that was installed on Windows 7 now on linux?

I have a pre-installed IntelliJ IDEA 2018 with all my code running on it on Windows 7.
I want to somehow use the same version of the installation instead of reinstalling the software again on linux and setting up all the libraries and the paths to my code again.
Is there a way that i can use that installation of IntelliJ on Windows in linux, too?
I have the software installed in D: Drive.
As suggested in the comment, i had to go through a separate installation for linux and then import settings by using setting sync plugin https://www.jetbrains.com/help/idea/sharing-your-ide-settings.html

CefGlue Running Examples on Linux

I've downloaded the latest version of CefGlue as well as the corresponding CEF binaries. I can get the demo examples to run fine in Windows, but the Linux GtkSharp demo does not run. It compiles fine under MonoDevelop on my Linux box but throws a DllNotFoundException: libcef
I've put the libcef.so in the executable directory as well as running ldconfig in the CEF release directory.
I'm new to Linux, so there's probably something simple and obvious that I'm missing.
The answers on this Bitbucket issue explain how the library path resolution can be fixed.
Unfortunately, this Bitcuket issue goes on to explain that Linux support is broken and the maintainer Dmitry says that he doesn't have the resources to support linux.

I can't compile CGI project to Linux in Lazarus

I installed Lazarus 1.0.10 and FCL package.
I made a CGI test program to run in my Hostgator account but when I compile it I get this error:
fcllaz.pas(0,0) Fatal: Can not find unit system used by fcllaz.
That if I configure the project to target Linux SO. If I use standard (Windows) it compiles ok, but my hostgator account is Linux.
Does anyone had that kind of problem? How to fix it?
(a.s. If you are trying to do crosscompiling, crosscompiling TO linux is an advanced topic. You are better off with installing a similar *nix system as your host in a VM)
FPC is probably not completely installed. Some Ubuntu/debian versions insist on having to do manual configuration afterwards.
Make sure that
there is a symlink of $prefix/bin/ppc386 to $prefix/lib/fpc//ppc386
make sure there is a /etc/fpc.cfg or ~/.fpc.cfg with a -Fu line in it that points
to $prefix/lib/fpc/$FPCVERSION/units/$FPCTARGET/* (in this case FPC will fill in version and target)
where $PREFIX is the prefix where you installed FPC ( typically /usr or /usr/local )
for more information see the buildfaq

Kdevelop in Windows XP

I received a src archive from a friend who develops Qt apps on Linux on Kdevelop IDE. Is it possible to load the Kdevelop project in Windows in some IDE ? Is there a Kdevelop port on Windows without Cygwin/Msys etc ? Are there any workarounds or I should I have to install Linux and take charge?
Update : I visited the page as mentioned in the below answer, but there's no Kdevelop package in the KdeWin installer . See here
KDevelop 4 will also be available on Windows (together with a lot of other KDE4 software). It is currently in beta, but you can download a Windows installer. The installer also lets you install other KDE4 software and should come with the QT development files you will need to develop QT applications.
AFAICT, there is no port to Windows of Kdevelop4 and Kdevelop3 was run with cygwin - which, IMHO, is not really a robust solution.
It would probably be easier, and better, to install a Linux distro in a virtual machine and go at it from there. If you don't need access to Windows, you could just install a Linux on a separate hardrive and/or partition.
Install linux on virtual machine such as vmware or virtual box.

Resources