9/30/2019
22

On Windows, configuring CLion requires setting up the environment: Cygwin, MinGW, WSL, or MSVC. You can have several environments installed on your system and create separate CLion toolchains for each of them. 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).

  • Developers describe Mac OS X as 'A desktop operating system for Macintosh computers'. It brings new features inspired by its most powerful users, but designed for everyone. Stay better focused on your work in Dark Mode. Automatically organize files using Stacks. On the other hand, Cygwin is detailed as 'A way to run native Linux apps on Windows'. It is a POSIX-compatible environment that runs natively on Microsoft Windows.
  • Cygwin is a Linux-based application for Windows that make it easy to port running on POSIX systems including Linux, BSD, and UNIX-based systems to Windows operating systems. Cygwin is one of the largest collections of GNU and open source tools that provide functionality similar to a Linux based distribution on Windows operating systems.
  • For Cygwin, you need to install the GDB package in the Cygwin Package Manager, as described in the Cygwin section of this guide. You can also switch to a custom GDB binary. In this case, the supported GDB versions are 7.8.x-8.3.x. Note that for GDB 8.0 and later, debugger output is redirected to CLion console by default.

Cygwin

Cygwin version. The most recent version of the Cygwin DLL is 3.0.7. Installing Cygwin. Install Cygwin by running setup-x8664.exe (64-bit installation) or setup-x86.exe (32-bit installation) Use the setup program to perform a fresh install or to update an existing installation.

It requires Python 2.4-3.2 and natively supports Windows, Linux, Mac, Cygwin, MSVC. Better CD v.0.5.0 BCD is a shorthand for 'Better CD'. It is modeled after 'cdargs' utility and allows you to give aliases to frequently used directories and 'cd' to them. May 06, 2018  Visual Studio for Mac can be used to build applications and create assemblies during the development of your project. It's important to build your code often to allow you to quickly identify type mismatches, erroneous syntax, misspelled keywords, and other compile-time errors. Installing and Updating Cygwin for 32-bit versions of Windows Run setup-x86.exe any time you want to update or install a Cygwin package for 32-bit windows. The signature for setup-x86.exe can be used to verify the validity of this binary using this public key.

  1. Download the Cygwin installer, version 2.8 or later.

  2. Run the installer and select the following packages:

    • gcc-g++
    • make
    • cmake
    • gdb

    To select a package, type its name in the Search field and then click it in the list until a tick mark appears in the Bin? column:

  3. Once the installation is finished, open CLion and go to File Settings Build, Execution, Deployment Toolchains. Choose the toolchain that you want to configure.

  4. Select Cygwin from the Environment list. CLion will attempt to detect the Cygwin installation automatically. Check the detection result, and specify the path manually if required.

  5. Wait until the tools detection finishes, and press Apply.

MinGW

  1. Download the MinGW or MinGW-W64 installer.

  2. Run the installer and select the following packages in the Basic Setup list: mingw-developer-tool, mingw32-base, mingw32-gcc-g++, mingw32-msys-base.

  3. Once the installation is finished, open CLion and go to File Settings Build, Execution, Deployment Toolchains. Choose the toolchain that you want to configure.

  4. Select MinGW from the Environment list. CLion will attempt to detect the MinGW installation automatically. Check the detection result, and specify the path manually if required.

  5. Wait until the tools detection finishes. If CLion cannot detect compilers or make, double-check the installed packages in MinGW Installation Manager. Press Apply when all the tools are set correctly.

Windows Subsystem for Linux

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).

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.

Refer to our WSL guide for details on setting up WSL on your system and configuring WSL toolchains in CLion.

Microsoft Visual C++

MSVC compiler

CLion supports the Microsoft Visual C++ compiler that ships with Visual Studio 2013, 2015, 2017, and 2019.

Note that msbuild is not supported: CLion runs CMake with the NMAKE generator instead.

  1. Install Visual Studio 2013, 2015, 2017, or 2019 on your system.

  2. In CLion, go to File Settings Build, Execution, Deployment Toolchains and choose the toolchain that you want to configure.

  3. Select Visual Studio from the Environment list. CLion will attempt to automatically detect the installed Visual Studio distribution. If the detection fails, set the path to Visual Studio manually.

  4. If required, specify the Architecture (x86, amd64, x86_arm, or another), Platform (store, uwp, onecore, or leave it blank), and Version. To build your project for the selected architecture, CLion will call the script to configure the environment with the specified parameters.

  5. Wait until the tools detection finishes. Note that debugger is not available for the MSVC toolchain by default (see the next chapter):

For the case when your code includes MSVC extensions, CLion provides the support for:

  • __uuidof, __forceinline, __unaligned, and __alignof keywords;

  • pointer type attributes: __ptr32, __ptr64, __uptr, __sptr;

  • MSVC built-in data types: (unsigned) __int8, (unsigned) __int16, (unsigned) __int32, (unsigned) __int64, __wchar_t;

  • additional format specifiers, such as %I32 and %I64;

  • the clang's -fms-extensions flag.

Experimental MSVC debugger

Debugging for the MSVC toolchain is available as an experimental feature (disabled by default). The experimental state means that the debugger is currently under development. We recommend you check the list of known issues and limitations in this blog post.

Trial

To turn the MSVC debugger on, press Ctrl+Shift+Alt+/ to invoke the Maintenance popup (or call Help Find Action and search for Maintenance), then choose Experimental features. Select the cidr.debugger.lldb.windows option:

After enabling the experimental debugger, go to the MSVC toolchain settings. The Debugger field will show Bundled LLDB:

This debugger, implemented on top of LLDB, can work with the native visualizers taken from the Visual Studio installation or from your project. To enable them and set the desired diagnostics level, select Enable NatVis renderers for LLDB in Settings Build, Execution, Deployment Debugger Data Views C/C++:

Also, if you have custom native visualizers in your project, CLion will use them as well:

GDB on Windows

In the case of MinGW, CLion includes the bundled GDB (version 8.3). For Cygwin, you need to install the GDB package in the Cygwin Package Manager, as described in the Cygwin section of this guide.

You can also switch to a custom GDB binary. In this case, the supported GDB versions are 7.8.x-8.3.x.

Note that for GDB 8.0 and later, debugger output is redirected to CLion console by default. To enable opening an external console window for application input/output, go to Help Find Action or press Ctrl+Shift+A, search for Registry, and set the following key: cidr.debugger.gdb.workaround.windows.forceExternalConsole.

Installing and Updating Cygwin for 64-bit versions of Windows

Run setup-x86_64.exe any time you want to update orinstall a Cygwin package for 64-bit windows. The signature for setup-x86_64.exe can be used to verify the validity ofthis binary using this public key.

Installing and Updating Cygwin for 32-bit versions of Windows

Run setup-x86.exe any time you want to update orinstall a Cygwin package for 32-bit windows. The signature for setup-x86.exe can be used to verify the validity ofthis binary using this public key.

General installation notes

When installing packages for the first time, setup*.exedoes not install every package. Only the minimal base packagesfrom the Cygwin distribution are installed by default, which takes up about 100 MB.

Clicking on categories and packages in the setup*.exe package installationscreen allows you to select what is installed or updated.

Individual packages like bash, gcc, less, etc.are released independently of the Cygwin DLL, so the Cygwin DLL version is notuseful as a general Cygwin release number. The setup*.exe utilitytracks the versions of all installed components and provides the mechanismfor installing or updating everything available from this site forCygwin.

Once you've installed your desired subset of the Cygwin distribution,setup*.exe will remember what you selected so rerunning theprogram will update your system with any new package releases.

On Windows Vista and later, setup*.exe will check bydefault if it runs with administrative privileges and, if not, will tryto elevate the process. If you want to avoid this behaviour and installunder an unprivileged account just for your own usage, runsetup*.exe with the --no-admin option.

Q: How do I add a package to my existing Cygwin installation?

A: Run the setup program and select the package you want to add.

Tip: if you don't want to also upgrade existing packages, select 'Keep' at thetop-right of the package chooser page.

Q: Is there a command-line installer?

A: Yes and no. The setup*.exe program understandscommand-linearguments which allow you to control its behavior and chooseindividual packages to install. While this provides some functionalitysimilar to such tools as apt-get or yum it is not asfull-featured as those package managers.

Q: Why not use apt, yum, myfavourite package manager, etc.?

A: The basic reason for not using a more full-featured package manager is thatsuch a program would need full access to all of Cygwin's POSIX functionality. Thatis, however, difficult to provide in a Cygwin-free environment, such as exists onfirst installation. Additionally, Windows does not easily allow overwriting ofin-use executables so installing a new version of the Cygwin DLL while a packagemanager is using the DLL is problematic.

Cygwin For Mac

Q: How do I install everything?

A: You do not want to do this! This will install an enormous number of packagesthat you will never use, including debuginfo and source for every package.

If you really must do this, clicking on the 'Default' label next to the'All' category to change it to 'Install' will mark every Cygwin package forinstallation. Be advised that this will download and install tens of gigabytesof files to your computer.

Q: How do I verify the signature of setup?

A: e.g.

Cygwin Download For Mac

Q: What's the hash of setup?

Download Odin For Mac

A: See here

Q: How do I help improve setup?

Cygwin Install For Mac

A: See the setupproject page for more information.

mupn.netlify.com – 2018