clion

How to fold custom region in CLion through comments?

拥有回忆 提交于 2021-02-08 15:12:37
问题 I read this: https://www.jetbrains.com/clion/help/folding-and-expanding-custom-blocks.html and tried following this link: https://www.jetbrains.com/clion/help/Folding_Custom_Regions_with_Line_Comments.html but it appears to be broken, since it redirects to "Meet CLion" page. How do I define custom folding regions in CLion using comments? 回答1: CLion is based on IntelliJ IDEA, and thus supports multiple ways, including: //region Description //endregion and //<editor-fold desc="Description"> //<

CLion - CMake error while creating new project

折月煮酒 提交于 2021-02-08 08:15:16
问题 I just installed CLion on my computer with MinGW and decided to create a simple Hello World project to test it, but when I create it the console outputs an error: >"C:\Program Files (x86)\JetBrains\CLion 2016.3.3\bin\cmake\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - MinGW Makefiles" "E:\Programação\C++\Hello World" >-- The C compiler identification is GNU 5.3.0 >-- The CXX compiler identification is GNU 5.3.0 >-- Check for working C compiler: C:/MinGW/bin/gcc.exe >-- Check for

gcc 10.1: weird behavior with clang-tidy (clion) and precompiled headers (cmake)

匆匆过客 提交于 2021-02-05 10:28:38
问题 I have had problems with my IDE since an update to GCC 10.1 a few days ago. I use CLion, which uses clang-tidy as linter. I also use the newly introduced command target_precompiled_headers from CMake to use PCH for my project. Unfortunately I get weird linter warning and error messages: That's how I include the header file for my pch in my CMakeLists.txt : target_precompile_headers(Peach PRIVATE ${PROJECT_SOURCE_DIR}/Src/peach_pch.h) Strangely enough, my program compiles perfectly. So the

gcc 10.1: weird behavior with clang-tidy (clion) and precompiled headers (cmake)

蓝咒 提交于 2021-02-05 10:26:35
问题 I have had problems with my IDE since an update to GCC 10.1 a few days ago. I use CLion, which uses clang-tidy as linter. I also use the newly introduced command target_precompiled_headers from CMake to use PCH for my project. Unfortunately I get weird linter warning and error messages: That's how I include the header file for my pch in my CMakeLists.txt : target_precompile_headers(Peach PRIVATE ${PROJECT_SOURCE_DIR}/Src/peach_pch.h) Strangely enough, my program compiles perfectly. So the

Linux系统环境下配置ImageBasedModellingEdu

做~自己de王妃 提交于 2021-02-03 10:51:59
Linux系统环境下配置ImageBasedModellingEdu 各位小朋友,大朋友们,大家好啊!最近小编在学三维重建(本人网名红狐狸,大家可以这么称呼我哈!),感觉这个东西对新手不太友好,所以想着做一些笔记。一来可以给感兴趣的同学留一点方便,二来也可以找一些志同道合的小伙伴共同探讨学习一下。我也是菜鸟上路,各位同门,多多指教!有兴趣可以点个关注,有问题欢迎私信。后面小编还会更新一些小编在学习路上的教程和心得哦! 这次配置环境我参考了很多人写的笔记,然后这篇教程我主要在我遇到的问题上,对原有的教程进行补充一下哈!借鉴一下大佬们的笔记,然后再进行补充一点。这次我参考的是深蓝学院的原配教程,地址送上:https://github.com/weisui-ad/ImageBasedModellingEdu 需要安装的软件: g++&gcc(Ubuntu下自带gcc编译器,我们只需要装个g++。通过“gcc -v”命令来查看gcc版本。 ) sudo apt - get update sudo apt - get install build - essential g ++ - v cmake sudo apt install cmake sudo apt - get install cmake - qt - gui clion sudo snap install clion --

OpenGL shaders don't compile

北慕城南 提交于 2021-02-02 09:21:20
问题 The shaders in my OpenGL project don't compile. I have Ubuntu 16.04 LTS, using CLion. Didn't find any solution, that's why asking here. Here is my errorlist: ATTENTION: default value of option force_s3tc_enable overridden by environment. ERROR::SHADER::VERTEX::COMPILATION_FAILED 0:1(1): error: syntax error, unexpected $end ERROR::SHADER::FRAGMENT::COMPILATION_FAILED 0:1(1): error: syntax error, unexpected $end ERROR::SHADER::PROGRAM::LINKING_FAILED error: linking with uncompiled shadererror:

undefined reference to `omp_get_wtime'

橙三吉。 提交于 2021-01-28 12:05:38
问题 i learn c++, OpenMP. I have tried compile my program with omp_get_wtime and it doesn't work, but when i deleted this, it works. i must add something, but what and where. In openmptryflags or Cmakelists? snap/clion/61/bin/cmake/linux/bin/cmake --build /home/bapah/CLionProjects/omp1/cmake-build-debug --target omp1 -- -j 6 [ 50%] Linking CXX executable omp1 CMakeFiles/omp1.dir/main.cpp.o: In function `main': /home/bapah/CLionProjects/omp1/main.cpp:36: undefined reference to `omp_get_wtime'

Linking SDL2 - CLion - Ubuntu 16.04 - G++

∥☆過路亽.° 提交于 2021-01-28 11:09:05
问题 Background info As the title says, I am on Ubuntu 16.04 using CLion and G++, and I am unable to link SDL2. SDL2.h is found in the project at External Libraries/Header Search Paths/include/SDL2 . This seems to link to /usr/include/SDL2 . So, with the header file found, I can #include <SDL2/SDL.h> without any issues. Yet, when I try to make use of SDL2 with something like, SDL_Init( SDL_INIT_EVERYTHING ) , I get an undefined reference . If I compile from terminal with g++ main.cpp -lSDL2 -o

Linking SDL2 - CLion - Ubuntu 16.04 - G++

為{幸葍}努か 提交于 2021-01-28 11:03:10
问题 Background info As the title says, I am on Ubuntu 16.04 using CLion and G++, and I am unable to link SDL2. SDL2.h is found in the project at External Libraries/Header Search Paths/include/SDL2 . This seems to link to /usr/include/SDL2 . So, with the header file found, I can #include <SDL2/SDL.h> without any issues. Yet, when I try to make use of SDL2 with something like, SDL_Init( SDL_INIT_EVERYTHING ) , I get an undefined reference . If I compile from terminal with g++ main.cpp -lSDL2 -o

Process exit code 0xC0000135 while running Qt hello world

亡梦爱人 提交于 2021-01-28 05:31:37
问题 Here is my main.cpp code: #include <iostream> #include <QtWidgets/QApplication> #include <QtWidgets/QPushButton> using namespace std; int main(int argc, char *argv[]) { QApplication application(argc, argv); QPushButton button("Hello, world!"); button.show(); return application.exec(); } Running it in CLion IDE (latest version) gives me the following error: Process finished with exit code -1073741515 (0xC0000135) Here is my CMakeLists.txt : cmake_minimum_required(VERSION 3.13) project(simple