Clion Open Visual Studio Project

Posted : admin On 1/25/2022

CLion is my favourite C++ IDE by far. Microsofts Visual Studio can't stand a chance against what CLion has to offer. The autocompletion is superior and works out of the box without random dropouts or errors. CLion doesn't have stupid project files, it just works with CMake. CLion supports all compilers CMake supports, works cross platform and has no problems when updating or downgrading from other versions whatsoever (this alone puts it above any Visual Studio version by far).

Hi all, There is a piece of good news here. We are so happy to present the first MVP of the PlatformIO plugin for CLion. Big thanks to JetBrains CLion Team, especially to @elmot for his amazing work. This is not the final release. We just want to get some feedback and would be thankful if you help us to build a list with the most important features. Demo ESP-32 RISC-V How to try it?

Here is my analysis of Visual Studio vs CLion. Performance - Visual Studio handles larger projects better than CLion. Debugging - Visual Studio is much better at debugging. While CLion does the basics, Visual Studio does so much more and has better. After some search it seems like both CLion and Rider can do this, but I don’t know which is better? Some post said that CLion can’t show the folder filter hierarchy in Visual Studio while Rider can, but I’m not sure about whether Rider can open Visual Studio project in C. CLion supports and auto-detects Microsoft Visual C toolchain from Visual Studio 2013, 2015, 2017, and 2019. To use Clang-cl instead of MSVC, select the Visual Studio toolchain in CLion and point to clang-cl.exe in the toolchain settings (versions 8.0 and later are supported).

Downside: CLion not free of charge. CLion costs 89.00 € a year (and gets cheaper the following years) which is a fair price for what you get.

Get CLion for free!

You get free access to every EAP (Early Access Program) version released. If you're a student, you get all Jetbrains Products, including CLion, for free.

If you want to give CLion a try, you can use the 30-days trial.

Prepare CLion

Most important step: Install Visual Studio 2005 and CLion.

Add the Toolchain

Clion visual studio not foundName

In order to add Visual Studio 2005 as a compiler, we need to make a small change so CLion can detect it.

1. Patch Visual Studio 2005

CLion requires the environment variable %VisualStudioVersion% to be present. Visual Studio 2005 does not populate this environment variable, therefore CLion will only state Not found when simply adding Visual Studio 2005 as a toolchain.

Change this file %VS80COMNTOOLS%vsvars32.bat and add this line at a appropriate location.

If you can not find this file, press Win + R on your keyboard, enter %VS80COMNTOOLS% in the dialog and press enter. The explorer should open and you can open vsvars32.bat from there.

2. Add Toolchain

Next add Visual Studio 2005 as a toolchain in CLion. Choose the root path of your Visual Studio install, e.g. C:Program Files (x86)Visual Studio 8.0

CLion should then properly detect Visual Studio 2005. It will warn you about the version, but that's okay for now.

3. Add Release-Build configuration

For some reason, debug builds fail to execute with return code 0xC0000135 (STATUS_DLL_NOT_FOUND). Debug builds are linked against msvcXX**d**.dll versions, which for some random reason can't be found.

A workaround is to just add the Release-configuration in CLion and stick to that until a better solution is available.

Since SRO_DevKit only supports building on Release, this is not an issue for us.

Opening the project

Clone the project using Git (don't forget the submodules) into a folder of your choice. After that you can open the project. When starting CLion it either shows you a welcome screen with your recent projects, or it goes straight to IDE-mode.

In case you don't get the welcome window, you can open the project by clicking 'File -> Open'

In the following dialog, select the folder containing the SRO_DevKit project. CLion automatically marks valid project folders with a small icon.

Run configuration

CLion can run the sro_client.exe for you. You just need a valid configuration. SRO_DevKit automatically deploys the Dll to a folder called BinOut. The recommended build configuration is RelWithDebInfo (Meaning 'Release with debug info'). When you put a working Silkroad Client into that folder, CLion can run the client using the following configuration:

This page covers how to integrate Bazel with IDEs, such as IntelliJ, AndroidStudio, and CLion (or build your own IDE plugin). It also includes links toinstallation and plugin details.

IDEs integrate with Bazel in a variety of ways, from features that allow Bazelexecutions from within the IDE, to awareness of Bazel structures such as syntaxhighlighting of the BUILD files.

If you are interested in developing an editor or IDE plugin for Bazel, pleasejoin the #ide channel on the Bazel Slack or emailthe bazel-dev mailing list.

IDEs and editors

IntelliJ, Android Studio and CLion

Official plugin for IntelliJ, Android Studio, andCLion. The plugin is open source.

This is the open source version of the plugin used internally at Google.

Features:

  • Interop with language-specific plugins. Supported languages include Java,Scala, and Python.
  • Import BUILD files into the IDE with semantic awareness of Bazel targets.
  • Make your IDE aware of Starlark, the language used for Bazel’s BUILD and bzlfiles
  • Build, test, and execute binaries directly from the IDE
  • Create configurations for debugging and running binaries.

To install, go to the IDE’s plugin browser and search for Bazel.

To manually install older versions, download the zip files from JetBrains’Plugin Repository and install the zip file from the IDE’s plugin browser:

Xcode

Tulsi andXCHammer generate Xcode projects fromBazel BUILD files.

Visual Studio Code

Official plugin for VS Code.

Features:

Clion Project Structure

  • Bazel Build Targets tree
  • Starlark debugger for .bzl files during a build (set breakpoints, step throughcode, inspect variables, and so on)

Find the plugin on the Visual Studiomarketplace.The plugin is open source.

Atom

Clion Open Visual Studio Project Download

Find the language-bazel package onthe Atom package manager.

Vim

See bazelbuild/vim-bazel on GitHub

Emacs

See bazelbuild/bazel-emacs-mode onGitHub

Visual Studio

Lavender is an experimental project forgenerating Visual Studio projects that use Bazel for building.

Eclipse

Bazel Eclipse Feature is a set of plugins for importing Bazel packages into an Eclipse workspace as Eclipse projects.

Automatically run build and test on file change

Bazel watcher is a tool forbuilding Bazel targets when source files change.

Building your own IDE plugin

Read the IDE support blogpost to learn more aboutthe Bazel APIs to use when building an IDE plugin.