Skip to content

C C++

C Compiler Windows install

Download and install Minimalist GNU for Windows - Install - continue - continue - mark for install - mingw32-base - mingw32-gcc-g++ - Installation > apply changes > apply

Edit system environment - user variable - edit Path - New - c:\MinGW\bin - OK > ok > ok

Windows Environment Variables

Edit Windows Environment Variables User Variables Add new C:\msys64\ucrt64\bin Click ok

#open cmd and run the following
gcc --version
g++ --version
gdb --version

using the gcc - C compiler

gcc -fPIC -shared -o shell.so shell.c -nostartfiles
gcc scriptName -o programName -w

Arch Linux - C++ and MinGW-w64 in Visual Studio Code

Get Started with C++ and MinGW-w64 in Visual Studio Code Download and install the exe from MSYS2

In the window after installation run the following

pacman -S mingw-w64-ucrt-x86_64-gcc
pacman -S --needed base-devel mingw-w64-ucrt-x86_64-toolchain

Learning Resources