Cant find any easy way to compile c++ projects under g++ in visual studio 2019. All I can find are tutorials for Visual Studio Code, not the full Visual Studio.
Visual Studio's C++ Android development natively supports building your projects with the GCC that ships with the Android NDK, just like it does for Clang. You can also target Linux – either remotely or locally with the Windows Subsystem for Linux – with GCC.
Build and run your code in Visual Studio To build your project, choose Build Solution from the Build menu. The Output window shows the results of the build process. To run the code, on the menu bar, choose Debug, Start without debugging. A console window opens and then runs your app.
In this tutorial, you configure Visual Studio Code to use the GCC C++ compiler (g++) and GDB debugger from mingw-w64 to create programs that run on Windows. After configuring VS Code, you will compile and debug a simple Hello World program in VS Code.
Open VS Code. Select the Extensions view icon on the Activity bar or use the keyboard shortcut (Ctrl+Shift+X). Search for 'C++' . Select Install.
You can use a Linux emulator on your Windows machine like Cygwin or WSL to compile and run your programs (along with gaining access to other Linux terminal features).
You'll just have to set up the environment and install the packages you want (in your case, gcc-g++).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With