Install clang-cl from the LLVM site or along with the Visual Studio tools. CLion supports clang-cl version 8.0 and later.
MSVC built-in data types: (unsigned) _int8, (unsigned) _int16, (unsigned) _int32, (unsigned) _int64, _wchar_t Īdditional format specifiers, such as %I32 and %I64 Īs an alternative compiler, you can use clang-cl- the MSVC-compatible compiler driver for Clang. Pointer type attributes: _ptr32, _ptr64, _uptr, _sptr _uuidof, _forceinline, _unaligned, and _alignof keywords
Note that msbuild is not supported: CLion runs CMake with the NMAKE generator instead.įor the case when your code includes MSVC extensions, CLion provides the support for: Wait until the tools detection is finished:ĬLion supports the Microsoft Visual C++ compiler that ships with Visual Studio 2013, 2015, 2017, and 2019.
If the version of your compiler toolset is earlier than the version of your Visual Studio installation, pass it in the Version field via the vcvars_ver flag, for example, -vcvars_ver=14.16. To build your project for the selected architecture, CLion will call the script to configure the environment with the specified parameters. If required, specify the Architecture ( x86, amd64, x86_arm, or another), Platform ( store, uwp, onecore, or leave it blank), and Version. If the detection fails, set the path to Visual Studio manually. CLion will attempt to automatically detect the installed Visual Studio distribution. In CLion, go to File | Settings | Build, Execution, Deployment | Toolchains.Ĭlick and select Visual Studio from the list of toolchain templates.Ĭheck the Environment field. Refer to our WSL guide for details on setting up WSL on your system and configuring WSL toolchains in CLion. WSL toolchain enables you to build projects using CMake and compilers from Linux and run/debug on WSL without leaving CLion running on your Windows machine.
You can use WSL, Windows Subsystem for Linux, as your working environment in CLion on Windows 10 (starting the Fall Creators Update version 1709, build 16299.15). Wait until the tools detection finishes, and click Apply. Check the detection result, and specify the path manually if required. CLion will attempt to detect the Cygwin installation automatically. Choose the toolchain that you want to configure. Once the installation is finished, open CLion and go to File | Settings | Build, Execution, Deployment | Toolchains. To select a package, type its name in the Search field and set the version in the New column: Run the installer and select the following packages: The recommended option is bundled GDB, since it is guaranteed to include Python support required for CLion data renderers.ĭownload the Cygwin installer, version 2.8 or later. In the Debugger field, you can choose between the bundled GDB, MinGW GDB, or your custom GDB executable. When configuring the toolchain, if CLion cannot detect compilers or make, double-check the installed packages in MinGW Installation Manager. In the MinGW installation wizard, select the following packages from the Basic Setup list: mingw-developer-tool, mingw32-base, mingw32-gcc-g++, mingw32-msys-base. Select the Debugger: you can use either MinGW-w64 GDB or a custom GDB binary.Ĭlick Apply when all the tools are set correctly.Īlthough MinGW-w64 provides both 64- and 32-bit options, you can also install MinGW, the 32-bit-only version. Check the detection result in the Environment field, and specify the path manually if required. Once the installation is finished, open CLion and go to File | Settings | Build, Execution, Deployment | Toolchains.Ĭhoose the MinGW toolchain that you want to configure or create a new one using the icon.ĬLion will attempt to detect the MinGW installation automatically. Note that the default suggested option is 32-bit.
In the MinGW-w64 installation wizard, make sure to select the required architecture. MinGW MinGW-w64 (64- and 32-bit)ĭownload and run the MinGW-w64 installer.
As a determining part of a toolchain, the environment provides C and C++ compilers, the make utility, and the debugger (in case of using default tools).įor details on Remote Host toolchains, see Full Remote Mode. You can have several environments installed on your system and create separate CLion toolchains for each of them. On Windows, configuring CLion requires setting up the environment: Cygwin, MinGW, WSL, or Microsoft Visual C++.