Line comment in Clion/Cmake does not work

已完成

This is my first project with Clion, so I may have done something wrong. I started with the "Hello World" example and I did not change "main.cpp". Next I have tried to enter a line comment in "CMakeList.txt". The starting "#" is shown as a ",". When I try to build the project, it fails with a parse error. Pasting a "#" in "CMakeLists.txt" results in a "," too. But opening "CMakeLists.txt" in noteplus++ shows a "#".

0

Update:

After cleaning the project and after "CMake/Reset Cache and Reload Project" I can now compile the project. The comment line is now shown in gray as it should be, but it still starts with a "," on the screen. After more testing I found that the key "'" (wich is Shift-# on a german keyboard) is most of the time shown as a "." To reproduce this one can press the keys " ' # ' ' ' " (without the blanks) on a new line. On the screen the keys are shown as " ' , . . ." (also without the blanks). Strange ...

0

Update:

The editor font which I used was "Hack". After changing the font to "Courier New" all content was rendered corectly.

0

请先登录再写评论。