

If you really look at it the most obvious difference is that. I believe WSL is not targeting Linux newbies.I will provide a detailed differences between Visual Studio and Visual Studio Code below. I never used Windows (and I am coding since 1974), but my biased opinion is that WSL is targeted for Linux gurus who (sadly for them) have to use Windows. And very different from Microsoft design ideas related to Windows. Read about the Unix philosophy, it is relevant on Linux. above all, approach Linux programming with a fresh and open mindset. You could also be interested by the Clang static analyzer or by Frama-C++ Take inspiration from existing open source C++ projects on Linux On Linux, all IDE for C++ programming would run a GCC or Clang compiler (and you'll need to understand what compilation command they are running for you). Perhaps use Visual Studio Code (to which I prefer GNU emacs, but you might try gedit, geany, vim, kate etc.)

In short how do I consume Shared Object (.so) files from another project using Visual Studio 2019 compiling for Linux using WSL 2 ?ĭon't use Visual Studio (I never used it myself, but according to rumors it is unfit for cross-compilation from Windows to Linux). Consider using some cross-platform C++ frameworks such as Qt or POCO.įor some projects, writing your GCC plugin could be useful. In some cases, generating parts of your C++ code (e.g. Use strace(1), ltrace(1), gdb(1) to understand the dynamic behavior of your or others software.

And use it in a terminal emulator on the command line. If your C++ shared library is built from several C++ translation units, learn how to use a build automation tool such as GNU make or ninja. If you code a single C++ translation unit foo.cc (you could use GNU emacs to edit it), compile it first into a shared object foo.so using a command g++ -Wall -Wextra -g -fPIC -shared foo.cc -o foo.so (all warnings, DWARF debug information, position independent code).

C++ is a difficult language (on both Linux and Windows). Of course, read more about programming in C++. Read of course Advanced Linux Programming, syscalls(2), How to write shared libraries, dlopen(3), proc(5), elf(5), ld.so(8), the Program Library HowTo, the C++ dlopen minihowto, the documentation of GCC, the documentation of GNU make, the documentation of GNU binutils, the documentation of GDB. This is -in terms of effort and your time- the cheapest route to follow. some genuine Linux distribution such as Debian or Ubuntu in some separate disk partition). Ask your boss permission to install Linux on your work computer
