clion

CLion uses system memory excessively

大兔子大兔子 提交于 2020-02-23 09:17:19
问题 I recently started to use CLion, on Windows 7 64-bit, for editing C files. One thing that bothers me a lot is that it uses too much system memory. It doesn't cause out of memory error as asked in another question. Actually CLion shows much lesser memory consumption in IDE (~500 mb out of ~2000 mb) than it takes from system (~1000 mb). You can see a snapshot of the system memory usage and CLion's memory display below: I use CLion not for C++ but for C projects. My project isn't that big (~5 c

c++: error: unrecognized command line option ‘-std=c++14’

一世执手 提交于 2020-02-22 08:31:06
问题 I just moved my PC from Ubuntu 15.10 to Linux Mint 17.3. Before this shift, this project compiled just fine in CLion. Now, it gives the following error: c++: error: unrecognized command line option ‘-std=c++14’ This is probably due to this line in my CMake file: set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -W -Wall -Wextra -pedantic") I suspect this error is due to some outdated library/compiler. I don't know exactly what I need to do. P.S.: I know that C++14 is not completely supported

手把手教你用CLION加上STM32Cubemx打造无敌STM32开发环境

好久不见. 提交于 2020-02-16 10:39:22
众所周知,STM32的常规开发环境是KEIL MDK5,但是这个编译器在很多方面做的不尽如人意,敲起代码来一点B格也没有( 划重点 ),而且随着年代的更迭,标准固件库终将要退出历史的舞台(就和XP,WIN7一样),他的爸爸ST(意法半导体)已经在逐渐的放弃标准固件库了,可以说他是没有未来的。 同时有一款新的开发工具STM32CubeMX,利用可视化的界面轻松完成时钟的配置和端口的选择。来感受一下: 主要输入你想要的时钟就会自动帮你生成文件,是不是特爽!!类似于FPGA开发的IP核配置。 可以轻松选择IO口的功能,自动完成各种初始化,最后只要在main里面直接使用即可。 所以说ST官方现在大力推行的HAL库和LL库才是未来,同理,cubemx生成的也是基于HAL库或者LL库(自己选择)。 至于CLION就不要我多说了吧,全地球最好用的JAVA IDE公司生产出来的为C\CPP开发的IDE 自然逼格拉满并且超级好用。 KEIL你看看人家!! 下载安装包 下面是重点,那么怎么配置环境呢? 以下所有安装包我会打包上传,但是建议各位上官网下载最新版本!! 下载交叉编译环境gcc-arm-none-eabi。 点击下载 下载最新即可,注意有不同平台的版本(windows,Linux,macos) win10选择第一个就可。 下载编译C/C++所需要的编译器MinGW 点击下载

Clion 刷题时多个 main 函数的解决方法

可紊 提交于 2020-02-16 01:09:20
Clion 刷题时多个 main 函数的解决方法 在写c/c++的过程中编辑器经历了从vc++到Dev-c++,到Clion。编辑器越来越智能,越来越好用。 问题: 但是在刷算法的过程中在Clion中是Cmake在管理项目,不能像Dev-c++中那样在一个文件夹下运行多个带main函数的文件。 方法一: 编辑Cmake文件,通过指定多个可执行文件来解决(有点繁琐) 方法二: 在每个文件中通过重定义的方法来解决   在写某道算法时,对main进行重定义,   运行完成以后:将main改为main04,即题号   这样就可以继续创建文件写下一道题,回头想复习哪道题时,只需要改一下对main的重定义即可运行。 来源: CSDN 作者: li123_123_ 链接: https://blog.csdn.net/li123_123_/article/details/104306643

In Clion's debugger, how do I show the entire contents of an int array

流过昼夜 提交于 2020-01-30 14:18:07
问题 Right now it is only showing the first element of the array but I want a visual of all the elements in the array. I think Clion is using GDB. EDIT: I am referring specifically to arrays on the heap. Arrays on the stack can be visualised. 回答1: Unfortunately, CLion doesn't currently support such feature. As suggested by JetBrains employee, you can use a workaround. In Evaluate / Watches window use the following expression: (MyType[128])myArray You can use arbitrary array size; whatever works

Window10环境下CLion配置教程

那年仲夏 提交于 2020-01-22 12:30:35
转载自: Window10环境下CLion配置教程 其实我以前一直是微软的脑残粉,所以写大一点的项目一般都是用Visual Studio的,然后刷题的时候使用vscode。知道某一天,我跑实验算法,用了pycharm,瞬间被圈粉了,果断全家桶走起(哈哈,当然是有点夸张了),反正目前CLion用着感觉还行。下面就进入正文,一方面是给自己的总结,另一方面是可以帮助需要帮助的人。 CLion配置教程(本教程是在win10环境下的) 1. 首先你肯定要下载CLion吧 我们就去jetbrains的官网下载CLion,网址如下: https://www.jetbrains.com/clion/download/#section=windows 接下来就是安装了,一路上没啥问题的,这里提一句,如果你有学校的邮箱,就可以申请jetbrains的免费教育许可证,edu教育邮箱验证一下即可,就可以享受正版软件了。 2. 配置编译器 2.1 方法一:MinGW 首先下载MinGW, 官方下载地址 ,但是有时候下载后有点慢,所以我给出 百度网盘 的下载地址,提取码为4dmt ,下载完成后解压到某个路径下就行。 然后打开CLion进行配置, 照着图片进行配置,环境选择MinGW(就是后面的路径是你刚才解压的路径,图片中的是我自己的路径,你的需要按照你的解压路径进行填写),不出意外的话其他都会自动补全的。

How to run MySQL/C++ Connector in CLion

独自空忆成欢 提交于 2020-01-22 02:30:31
问题 I want to run MySQL/C++ Connector in CLion IDE. I befor ran it in Visual Studio 2019 and it worked. I know that how to define MySQL/C++ Connector libraries in visual studio project but i dont know how to this in CLion. So how to run MySQL/C++ Connector in CLion , i mean how to declare MySQL/C++ Connector libraries and dll files in CLion. 来源: https://stackoverflow.com/questions/59799367/how-to-run-mysql-c-connector-in-clion

Windows10Clion安装与配置

北慕城南 提交于 2020-01-20 12:43:16
安装clion,官网下载地址:https://www.jetbrains.com/clion/download/ 安装完成后,打开clion,会发现底下有一行红色的小报错,不解决这个报错无法正常使用clion 解决方法: 首先安装Mingw64,下载地址: 百度云盘地址:https://pan.baidu.com/s/1ieSVqCCXD-i-XRHdrlDuqA 提取码:tton 下载完成解压缩并安装 我的安装路径是:D:\mingw64 打开Clion,依次选择: 在enviorment那里填上刚刚安装的mingw64的路径,下面的选项它会自己检查,等所有的都出现√时,点击右下角的apply与ok,保存退出。 即可看到控制台提示的报错消失,此时可正常运行代码啦! 来源: CSDN 作者: airenLe 链接: https://blog.csdn.net/airenKKK/article/details/104048825

CLion MSVC编译器 helloworld

心已入冬 提交于 2020-01-16 12:08:06
1.下载CLion 略 2.下载编译器MSVC CLion支持其他编译器,以MSVC为例。 vs编译器可以去 vs官网找生成工具(build tool) 下载。 所有下载->visual studio 2019工具->visual studio 2019生成工具。 cMake可以自己下载,注意环境变量所有用户生效选项勾选上。 sdk需要下载,否则可能会出现类似下面的错误。 /out:CMakeCXXCompilerId.exe CMakeCXXCompilerId.obj LINK : fatal error LNK1104: 无法打开文件“kernel32.lib” 3.CLion配置 如果安装好了msvc,不需要设置路径,cmake检查一下是否是自己下载安装的路径,注意版本适配。 运行 ps:注意路径名中尽量不要有中文! 来源: CSDN 作者: jwchu 链接: https://blog.csdn.net/weixin_32722775/article/details/103996889

CLION: WSL not found, ssh connected?

你说的曾经没有我的故事 提交于 2020-01-15 07:45:46
问题 Today I got this error message: "WSL not found at: C:\Users\Nick\AppData\Local\Microsoft\WindowsApps\debian.exe" Before this message today, everything worked fine (I start Debian through start menu, restart the ssh service, then start CLion and it linked up just fine.). The executable is there, just 0kb. The strange thing is that the Linux environment can be opened from windows as always (debian), I can ssh into it just fine (looks like CLion can as well, see picture). This happened after an