Hi,
It’s a big day today, since we are rolling out CLion 2016.1 release. Please, welcome!
This is the version that was previously tagged 1.5 – we hope our new versioning scheme doesn’t confuse you too much.
We’re nearly done with the announced roadmap, though some CMake items are left for future updates. Many extra features have also found their way into this release. Read on for more details, and then download and try the new version right now!
C++ language support
This release brings long-awaited support for variadic templates (C++11). With the related fixes in the function overload resolution, this makes it possible to resolve the code correctly and avoid many false positives in code analysis. This also means that Qt C++11 connect calls are resolved correctly in CLion:
Auto-import has been improved greatly for symbols from STL, and the quick documentation popup (Ctrl+Q
on Linux/Windows, F1
on OS X) now shows lambda expressions, namespace aliases and explicit instantiation, as well as accurately redirecting hyperlinks:
Code generation
In addition to Override that generates stubs for virtual member functions from any of base classes and Implement that overrides pure virtual functions from base classes, we’ve added Generate definitions (Shift+Ctrl+D
on Windows/Linux, ⇧⌘D
on OS X) which, as you would expect, generate definitions for existing declarations (in the previous versions you could use Implement action to get it). All three actions now put the code in the place the caret is positioned, in case it’s inside the class, or ask for a destination (if several options are available):
Thus CLion 2016.1 makes the code generation behaviour quite simple and straightforward – if you want the function to be generated in a header file – locate the caret in that class in your header file, and if you want it in the source file – execute action there.
‘Generate definitions’ can be called up in three different ways:
- By pressing
Shift+Ctrl+D
on Windows/Linux,⇧⌘D
on OS X. - Under the Generate menu (
Alt+Insert
in Windows/Linux,⌘N
on OS X). - As an intention action (
Alt+Enter
).
Read more details in the corresponding blog post.
CMake and directories control
On the CMake side, a new feature called Reset CMake Cache is now available which allows you to clear the CMake Cache without dropping all of IDE indexes and caches.
Sometimes your project folders may contain binaries, logs, generated data or build artifacts (that you surely don’t want CLion to index) or simply libraries (that you don’t want to touch with refactorings). To handle this, a new feature was introduced – ‘Mark directory As’, which allows you to manually set directory as:
- Excluded
- Library files
- Project sources and headers
Read how code completion, code generation, navigation and search features and refactorings are working for each of these cases.
The bundled Remote Host Access plugin will help you synchronize your sources with the remote host from time to time, for example if you develop on one machine but build/run on another. You can configure a FTP, FTPS or SFTP server together with the path mappings and excluded paths (to avoid downloading/uploading any files in particular):
Debug
In case you have a process running locally on your machine that you’d like to debug, you can do this within CLion. You just need to have the sources and open them in CLion, then call Attach to local process (from the Run menu or Find Action dialog) – and benefit from the built-in debugger. Processes can be searched by process name or process pid: just start typing and select a match from the list:
New languages
CLion 2016.1 comes with support for two additional languages: Python and Swift. The Python plugin is bundled into the IDE and is on by default. To easily start working on your mixed Python and C/C++ code project, install the Python SDK and point CLion to the Python interpreter for your project.
The feature set corresponds to the PyCharm IDE Community Edition and includes all the essential Python editing features, like code completion, formatting, navigation, etc., as well as Python refactorings, code analysis, and running/debugging/testing the Python part of your project. Get more details and watch a demo in this blog post.
Another addition is support for Swift language. As Apple has open sourced Swift, developers on Linux can now try the language, and for their work an IDE is essential. CLion is cross-platform, so version 2016.1 can be used as a Swift IDE on Linux. You can find the plugin in our repository.
The feature set of the Swift plugin comes from AppCode (our IDE for iOS/OS X development which is based on Xcode toolchain and runs on OS X only). Swift code can be properly highlighted, formatted and completed; navigation and search actions are also available. If you’re looking for more high-level features, welcome the familiar Rename refactoring for Swift:
The plugin also includes Override/Implement for functions and protocols, and a built-in debugger. More details and short demo can be found in a related blog post.
Other improvements
Other fixes and enhancements in this release include:
- By-word difference highlighting option.
- Support for multiple Git working trees and Checkout with Rebase Git action.
- Right-to-left languages (Arabic and Hebrew) are now supported in the editor.
- Automatic detection of Google Test configurations on project loading.
- Custom bundled JRE on Linux with fixes from the JetBrains team.
- And lots more.
To learn more, please visit the What’s new in CLion 2016.1 page on our website, view our demo below and download CLion for your operating system.
Try CLion 2016.1 now and let us know what you think in the comments section below!
The CLion Team
JetBrains
The Drive to Develop
It’s nice CLion now supports Python and Swift out of the box. I hope CPP-744 will be implemented very soon as well.
We’ll consider it for sure when planning the next release. We’ll share the plans as soon as we get the roadmap for 2016.2 version.
That might be non-trivial to get to work well. But if you can it is _the_ killer feature.
Another feature request is to support ninja as the build tool. I’m really trying to get my red/green/refactor cycle down to the fastest possible.
https://youtrack.jetbrains.com/issue/CPP-870
Thanks, we’ll consider.
Regarding CPP-744, I’d suggest that there are some potential incremental deliveries here. Remote compile and execution but _without_ remote debugging is still a useful feature. I’d go even further and say that remote compilation without even execution would be a useful feature for me.
That’s interesting, thanks a lot
I had one more thought. I don’t really know the complexities from your side, but from where I’m sitting, remote compile is rather similar to distributed compilation where the remote compile is the special case of compiling on only one remote server.
I do understand that there is a big difference between whether the code can compile locally or not, but maybe there is some synergy here?
It would be very cool if CLion would support distributed compilation without needing to have a Phd in compilerology.
Thanks) Interesting thought. We need to consider for sure.
OTOH, for us, it’s the full cross-compile to another architecture, copy over to target, remote run/debug or it’s nothing. Compiling on our weak target machine is a non-starter. Of course, if some are helped by the partial implementation that’s nice for them so it’s certainly better than nothing. Just remember not everyone has a powerful enough remote target to run a full tool chain
I can definitely live without disassembly though (considering the issue of different remote arch)
Also, this is the reason we currently don’t use clion.
Thanks for sharing!
Clion is now my favorite IDE for C++ coding, but not yet for C++ debug.
Please consider GDB debugging speed-up and Makefile/Custom build support for 2016.2!
https://youtrack.jetbrains.com/issue/CPP-2920
https://youtrack.jetbrains.com/issue/CPP-494
https://youtrack.jetbrains.com/issue/CPP-1607
Thanks, we’ll consider. We’ll publish the approximate roadmap as soon as we are ready. Stay tuned and thank you for your support!
Thanks for the hard work! I’m looking forward to variadic templates and some of the other features.
I noticed that the editor font appearance has changed and now has slightly more weight. I loved the old way that the default font (DejaVu Sans Mono) was displayed in 2.2. Is there any way to go back to that? I’m running elementaryOS Linux.
Thanks a lot! We appreciate your support.
CLion currently uses bundled JDK on Linux, it’s our custom version with the fixes from the JetBrains team. To change it you can call Find Action (Shift+Ctrl+A) and type ‘Switch IDE boot JDK’, then change it in the dialog that appears. Alternatively, you can set CL_JDK env var with your preferred Java version.
Thanks Anastasia. If I switch to a non-bundled JDK what fixes will I be losing?
Mostly it’s font rendering. Some crashes maybe related, but just report to us if you meet any (we’ll check if it’s related).
Ok. I installed the Oracle JDK on my system but when I invoke the Switch IDE boot JDK command it only gives me one option, the ‘bundled’ option. I followed this post http://www.wikihow.com/Install-Oracle-Java-on-Ubuntu-Linux, am I missing anything?
Probably it was searched in the wrong place… Feel free to share where it was installed so that we could check.
Bob, we suppose it’s a bug finally. So could you please kindly provide us some extra info to investigate and fix:
– OS version
– version output: call java (that is not seen by the switcher inside CLion) by the absolute path with -version option
Success! Towards the top of clion.sh I added this line and now my fonts are beautiful again. It seems kind of hackish but at least it’s working and I’m happy.
Thanks!
CL_JDK=$JAVA_HOME
It was installed to /usr/local/java/jdk1.8.0_73 and the $JAVA_HOME variable was set to that path. Do I need to set the $JDK_HOME variable also?
I believe no, but let us check.
elementaryOS Freya 0.3 (based on Ubuntu 14.04 LTS)
which java
/usr/bin/java
/usr/bin/java -version
java version “1.8.0_73”
Java(TM) SE Runtime Environment (build 1.8.0_73-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.73-b02, mixed mode)
Thanks. I’ve put this into the tracker: https://youtrack.jetbrains.com/issue/IDEA-153380
Feel free to follow the ticket to get updates.
Hi Anastasia,
If at all possible, can you guys decouple the font rendering from the rest of the JDK fixes? I’d love to use the bundled JDK except for the font part (looks really bad for the one I use). I was putting off the upgrade till Bob’s hack helped me (thanks, Bob!).
I’m really not sure this can be done, but please leave it as a feature request here: https://youtrack.jetbrains.com/issues/IDEA. The team will consider then. Or at least find some solution via settings.
If you could maybe attach some screenshots of what you dislike about font rendering, it would be perfect. Thanks in advance.
Hi Bob,
I’ve reported this as IDEA-151425, please subscribe, vote & share your experiences
–Yury.
Thanks Yury. Done.
User-defined literals(https://youtrack.jetbrains.com/issue/CPP-1727) have been a problem since 2014, and it is still broken now.
User-defined literals and constexpr are still not supported from C++11.
What do you mean by “not supported from c++11”? User-defined literals are used in the STL at least by “std::chrono” (http://en.cppreference.com/w/cpp/header/chrono)
CPP-1727 really hurts me as well
CLion currently doesn’t support user defines literals, that’s true. And we know they are used now in std::chrono, which makes us increase the priority of this task. We hope to have them supported soon. Please, follow the request to get the updates.
Amazing!
I hope will soon you will add a cmake support
*qmake
Here is the request: https://youtrack.jetbrains.com/issue/CPP-318. Comment, follow to get updates, upvote to increase priority
Thank you for the great product! Just want to know whether it is possible to add support for different project model via 3rd party plugins. I think to add support for IAR based projects by myself because i know it will has very low priority for you. Is there a chance i can do it now?
Also, there are some annoying bugs in the C development: https://youtrack.jetbrains.com/issue/CPP-4991 Any ETA for them?
Currently it’s not possible since there is no public interface or API for this. We do hope to have it when start working on at least seconf project model/build-system support. With only CMake on board it’s quite unstable to make it public.
We’ll check the issue linked and consider for the upcoming fixes/new release.
Still waiting for better preprocessor support, e.g. CPP-1100.
I have just updated to Clion 2016.1 and I can’t find the cmake toolbar anywhere.
Did I miss something??
Did already fixed the issue.
There was something wrong in my .idea directory.
The result was that no cmake files were generated.
It was just an empty directory.
When I renamed the .idea directory to something else, the problem solved.
Hm. Interesting. In case your project is CMake-based and something goes wrong with CMake in CLion next time you can try Tools | CMake | Reset Cache and Reload
How about View | Toolwindows | CMake?
I have a project that uses Qt and runs in Windows, Linux and OSX.
I use QtCreator to develop in all platforms. In windows I must use microsoft tool chain (I do not use visual studio editor, only compiler, debuger, etc..) because i use some libs that not compile with gcc in windows.
QtCreator is Ok but I was looking for something to speed up the work. I was willing to give CLion a shot, but for what I notice (correct me if I’ wrong) in windows I cannot use microsoft tool chain with CLion, I must use Reshaper for that, and more, in windows I have to start using Visual Studio editor with Reshaper and not Clion.
If this is correct instead of using CLion + QtCreator in all platforms I need a different one in windows (Visual Studio + Reshaper) and the cost will be 199€ x 2.
If this is the case I prefer to stick with QtCreator only.
Yes, we do agree that this is quite inconvenient for you. So we might consider supporting MSVC compiler in CLion: https://youtrack.jetbrains.com/issue/CPP-819
Then you can probably develop and debug on Linux and build on Windows. It is quite easy with CMake.
Thanks for the idea but when we have platform specific code that links with 3rd party libs this is not really an option. Nevertheless we spend most time programming in linux,
But still I recommend to stick with QtCreator until debugging experience improves in Clion. If you use CMake then you can switch between QtCreator and Clion easily,
Double that! Debugger stability is really the area waiting to be improved.
Nuno: Have you used Maven in the past? If so, you could try Maven NAR plugin and configure it to use msvc toolchain, CLion doesn’t support the plugin but you could use the terminal to compile, test, and install the package in a repository. See some basic archetype here https://github.com/lmiguelmh/clion-maven-archetype.
I recently updated to CLion 2016.1. I have some problems with Google Test: The macro EXPECT_TRUE() which is used to assert trueness is being marked as red in the code editor with message “Error after macro substitution: Class ‘testing::AsertionResult’ doesn’t have a constructor ‘AssertionResult(bool)'”. The weird thing is that the test compiles and executes succesfully. I was using CLion 1.2 before and never had this problem.
Yes, it’s a known regression – https://youtrack.jetbrains.com/issue/CPP-5986. Sorry for the inconvenience. Hope to fix soon.
Trying to compile QT project with Q_OBJECT macro for signals. Getting that error in 2017.2 EAP version. Is there a work around or something for it maybe?
Do you mean compilation issues? Or IDE’s false-positives?
Anastasia,
Do you want to push Clion into embedded systems and electronic design domain?
Currently it is completely dominated by Eclipse CDT-based solutions that are quite good, but not perfect imo.
I’m using Clion for hardware design and it works reasonably well.
We do plan this for sure.
It will be great if you share some typical issues that maybe need to be fixed especially for this area. Or just some specific feedback.
Embedded market is extremely diverse and there is no chance to create “one size fits all” solution, like JetBrains did for Java/Web world (Java/Web world is very diverse too (dozen of frameworks, database systems, multiple languages etc), but I think embedded is more diverse
).
Eclipse, the current king of embedded has different model: there is a common opensource core that anyone can contribute to and dozen of proprietary IDEs build on top of it. Eclipse-based products are supplied by Intel, TI, Xilinx, Altera, Synopsys, Analog devices, Mentor Graphics and many other companies. I’ve seen couple of Netbeans and QtCreator-based IDEs for embedded, but they are much less common.
But it was not like that 7-10 years ago, at that time most of those companies provided some custom-build IDEs or command-line tools only.
So to fight for this market Jetbrains will need to promote Clion as a better platform for plugin development then Eclipse. You will also need to win hobbyist market: looks like Arduino and Raspberry PI are two most common platforms in this area.
Now speaking about particular bugs:
Cross-compilation, remote debug
https://youtrack.jetbrains.com/issue/CPP-744
https://youtrack.jetbrains.com/issue/CPP-871
Assembly-level edit and debug
https://youtrack.jetbrains.com/issue/CPP-1742
https://youtrack.jetbrains.com/issue/CPP-1743
You will also need to create gui for embedded debug with CPU registers view, and memory area view (to observe memory-mapped IO)
But IMO debug is not yet there even for native linux projects. Its still slow, gdb-python pretty printers are not rendered correctly. I think you should fix this before implementing more debugger features.
Thanks Roman. We completely agree that the market is diverse and your ideas here are really valuable to us.
We also agree that we need a big work to be done in the debugger area to fit this market (and in general to satisfy our users needs). Especially those tickets you’ve mentioned. And I really hope we’ll be able to handle them in the upcoming releases. Let’s see.
I completely agree and even talked with JetBrains about this. A community / hobbyist edition of CLion that could be used to develop software for Raspberry Pi and Arduino would be great.
When these developers later land in the professional software business they won’t think twice about what tool to use.
I would like to ask where I can find see the roadmap CLion 2016.1?
Just wondering if it would be possible what QT support will be considered soon?
And of course support of UE4 is the same as in Visual Studio when you can create project in UE4 and Studio recognize project file and finally you can write a code?
Do you mean 2016.2? It will be published soon in our blog. Stay tuned.
Here it is: http://blog.jetbrains.com/clion/2016/03/clion-2016-2-roadmap/
Thanks for the answer.
And what about the future support UE4 and QT in qmake and cmake?
UE4 can work via CMake. So you can try it. Check this blog post for additional info: https://letstryunreal.wordpress.com/2015/05/06/setting-up-cmake-environment
Qt as a library is handled by CLion quite well now.
As for the qmake – we have a feature request https://youtrack.jetbrains.com/issue/CPP-318 – but (repeating our last paragraph from the post) we are currently not ready for implementing additional project model inside CLion, we’ll continue the investigation and some preliminary work in that direction, but it won’t make it to the 2016.2
I read this blog on UE4 but this is not the way out. This should work without any complicated settings, I think you understand. For example in Visual Studio is not required to do.
didn’t know about Quick Documentation feature before this post.
very useful. but not completely clear for me –
I see this shows , in addition to definition, an info from a comments as well , e.g. for STL types,
however it does not do this for my project types/methods/members.
even these are having doxygen formated doc
for project level, quick documentation just shows basic info like a header file, parent type, etc.
am I doing something wrong? maybe need to enable something in settings?
how to fix this?
Doxygen is not yet supported but is planned for 2016.2 and is currently in development.
> it does not do this for my project types/methods/members.
Could you please provide a sample?
just an examples from test project:
1. go to line like this:
std::this_thread::sleep_for(3s);
step on this_thread and press Ctrl+Q
I see something like this :
“…
@namespace std::this_thread
Brief
ISO C++ 2011 entities sub-namespace for thread. 30.3.2 Namespace this_thread.
…”
which was parsed from header:
“…
/** @namespace std::this_thread
* @brief ISO C++ 2011 entities sub-namespace for thread.
* 30.3.2 Namespace this_thread.
*/
namespace this_thread
…”
It looks good.
——————————————–
try the same for something in our project:
usage:
shm_server server;
declaration:
“…
* \class shm_server xxx.hpp “src/xxx.hpp”
* \brief processes incoming data and dump this to files
*
* class works as a wrapper for a worker thread (operator () ) which receives a data via shared memory
* server receives a data chunks from various clients until get empty vector of bytes, which is a flag of end of this client transfer
*
* \warning using std::cerr and std::clog is potentially thread unsafe, has to be replaced */
class shm_server : public base_interview_task {
….”
however Ctrl+Q gives me only:
“…
Declared In: searchinform.hpp namespace interview_tasks::searchinform class shm_server : public
…”
Thanks. I suppose it doesn’t work as expected because of this: https://youtrack.jetbrains.com/issue/CPP-5062. Feel free to upvote and follow to get the updates.
Is there any way to change the display value of custom types in Clion? I have custom containers and it would be very useful to see a custom representation of the stored value.
Do you mean in debugger? For GDB you can use pretty printers – https://sourceware.org/gdb/onlinedocs/gdb/Pretty-Printing.html (though some issues are known: https://youtrack.jetbrains.com/issue/CPP-5430)
I am a Clion user in China.When I need update,patch or install file from Jetbrains’ server,downloading speed will be very slow,sometimes can not complete successfully.Could you think about solutions?Such as cdn or something else?
We are currently working on such. Hope to have some in nearest future. Sorry for the inconvenience.
Thanks for your reply.Everything about Clion is good,but network speed causes much problem.
Installed today on windows and it’s unfortunate that only gdb7.8.x is supported, meanwhile, cygwin has only easy support to install gdb7.9x/7.10.x, so right away need to fight the install on windows.
The result is one needs to go through this convoluted install routine as posted on stackoverflow: http://stackoverflow.com/questions/35826635/clion-gdb-current-version-is-gnu-gdb-gdb-cygwin-7-10-1-1-7-10-1-supporte
Posting this to call your attention to save some future potential users from hours of work to get it running.
Thanks.
yes, that’s true that only 7.8 is supported for now. You can still set 7.9 or 7.10 as a custom used version in the settings and use it, however we are aware of several problems (like this one https://youtrack.jetbrains.com/issue/CPP-6732, or some other related to https://youtrack.jetbrains.com/issue/CPP-3311). We plan to fix them and then we can officially announce other GDB versions support.
Hello
On Ubuntu 16.04 with clion there is no code completion for swift core libraries Foundation https://github.com/apple/swift-corelibs-foundation/tree/master/Foundation
Is it planned?
Thanks
Yes, we do plan this for later: https://youtrack.jetbrains.com/issue/CPP-6208
Awesome, jetbrains never disappoints i love you <3 everywhere i go i talk about your products, big thanks
Thanks for your support!
Is there any plans to support the Swift Package Manager? This would be a HUGE win! I mean really HUGE! Is there an issue I can upvote or something? make a campaign!
It’s not in the nearest plans since we didn’t collect much feedback about Swift plugin usage for now from our users. However feel free to create a feature request: https://youtrack.jetbrains.com/issues/CPP, upvote and follow for the updates.
Clion is now my favorite IDE for C++ coding, but not yet for C++ debug.
Please consider add linking a server to debug.
Such as msvsmon.exe in VS2013.
Thanks.
CLion can do GDB Remote debug, provided that you have gdbserver on a remote machine (https://www.jetbrains.com/help/clion/remote-debug.html#d98705e15). We also plan more comprehensive remote toolchains integration (https://youtrack.jetbrains.com/issue/CPP-744), but I can’t give you ETA on this.