clion

OpenCV Windows setup with CLion

一曲冷凌霜 提交于 2019-12-04 12:01:26
I want to setup OpenCV on windows for the CLion IDE. I tried with OpenCV 3.1 and 2.4 with the same result. I have Windows 10 64 bits. CLion is using the cygwin environement. What I did so far: 1. Downloaded the exe from OpenCV and runned it (it extracted a package). My path is E:/opencv 2. Added OpenCV_DIR variable and added it to path 3. Added this to my project CMakeLists.txt: set(OpenCV_LIB_PATH E:/opencv/build/x64/vc12/lib) set(OpenCV_LIB_DIR E:/opencv/build/x64/vc12/lib) set(OpenCV_LIBS E:/opencv/build/x64/vc12/lib) set(CMAKE_PREFIX_PATH E:/opencv/build) set(OpenCV_DIR E:/opencv/build/x64

CLion Installation: Cmake compilers not found, GDB not found

吃可爱长大的小学妹 提交于 2019-12-04 10:08:35
问题 I'm switching from VS to CLion and they said I needed to install Cygwin and CMake. I then installed both of them. I tried use bundled, but CLion still gives me these errors make: not found C Compiler: not found C++ Compiler: not found GDB: not found . I have installed CMake under the path C:\Users\Gaga\Downloads\cmake-3.4.1 but I don't see a cmake.exe, the closest thing is cmake.cxx. Without these I'm not able to compile anything, please help 回答1: In the "Use specified" field I put C:

Importing Bazel Project fails in CLion on macOS

ⅰ亾dé卋堺 提交于 2019-12-04 09:50:52
I installed Bazel plugin on my CLion and am trying to import a new Bazel C++ project and I keep hitting into these errors- tensorflow_gpu-1.8.0lft1-cp27-cp27mu-linux_x86_64.whl is not a supported wheel on this platform. ERROR: error loading package '': Encountered error while reading extension file 'requirements.bzl': no such package '@my_deps//': Traceback (most recent call last): File "/private/var/tmp/_bazel_pmanjunath/0f9184e7a61c3740275307da0cc42014/external/io_bazel_rules_python/python/pip.bzl", line 39 _pip_import_impl(repository_ctx, "python") File "/private/var/tmp/_bazel_pmanjunath

GDB Monitor commands in CLion

旧时模样 提交于 2019-12-04 06:47:21
I'm trying to debug an embedded project using remote GDB. My system: Target: ARM Cortex M0. SEGGER J-Link GDB Server V6.10 Command Line Version arm-none-eabi-gdb 7.10.1.20160616-cvs CLion 2016.2.2, Build #CL-162.1967.7 Ubuntu 16.04 I have the following in my .gdbinit file: target remote localhost:2331 #(I remove this line when debugging with CLion) set verbose on file "/path_to_output_file/blinky.elf" monitor reset break main The thing that has troubled me for days now, is that this works fine if I debug with gdb directly from a terminal, but not when I use the debugger in CLion. In CLion I

var-create unable to create variable object

时间秒杀一切 提交于 2019-12-04 06:46:23
问题 When I debug c++ (in clion), I can't watch global strings . I tried to check other types but it worked well. Also, I tried local string and I can watch it too?! 回答1: Just in case, the issue is now tracked as CPP-8693. The root cause is somehow related to libstdc++ dual ABI. Global symbols of std::string types are mangled differently, which in turn confuses GDB. In the GCC 5.1 release libstdc++ introduced a new library ABI that includes new implementations of std::string and std::list . These

C++ running file with included library failes without compiling error (CMake / CLion)

a 夏天 提交于 2019-12-04 05:20:22
问题 I got the following problem; I have my super library called mylib: it looks like this: My project folder is called library... mylib.hpp namespace XYZ { #ifndef LIBRARY_MYLIB_HPP #define LIBRARY_MYLIB_HPP int add(int, int); #endif //LIBRARY_MYLIB_HPP } mylib.cpp #include "mylib.hpp" namespace XYZ { int add(int a, int b) { return a + b; } } They are in the same directory. I Build it using CMake with the following CMakeLists.txt cmake_minimum_required(VERSION 3.6) project(library) add_library

CLion and Crypto++ library

天大地大妈咪最大 提交于 2019-12-04 04:24:33
问题 Some time ago I started coding my application in Visual Studio 2015, had no issues setting all of the library dependencies. Now, I decided to move to CLion. However my application has a dependency of cryptopp library, which I need to link in my CLion project. Currently, I'm facing tons of undefined reference errors undefined reference to `CryptoPP::Integer::Integer(char const*)' undefined reference to `CryptoPP::Integer::Integer(char const*)' undefined reference to `CryptoPP::Integer::Integer

Clion how to add files to a project

吃可爱长大的小学妹 提交于 2019-12-04 03:59:58
This seems really basic. How can i add files to a project without having to manually edit the CMakeLists.txt . For example source files in another directory CLion parses the CMakeLists.txt and uses it to generate a project view, but I believe the only way to add files to the project is to edit the CMakeLists.txt to include those files. I expect that eventually this will change similar to the way IntelliJ integrates with a pom.xml file in a Java project, but for now you edit the CMakeLists.txt . No other option. You have to edit the CMakeLists.txt . CLion is completely cmake based IDE. Even if

CLion - Carriage return? \\r

二次信任 提交于 2019-12-04 02:55:45
I am using the CLion IDE and I am trying to do a carriage return. I am doing a print statement in C and have the following syntax: printf("\rHello World!"); which is inside a loop. The loop still prints every Hello World on its own line. There are no \n 's in my program. I've tried changing the line separators options to unix mac OS and windows and none of them change the functionality. Google has also led me to no useful answers. int main() { int i = 0; while (i < 5000000) { printf("\rThis is line number %d!", i++); } return 0; } My expected output is only a single line of text in the console

Accessing anything GLEW related immediately crashes program in MinGW

北慕城南 提交于 2019-12-03 17:07:20
Here is the code: #define GLEW_STATIC #include "GL/glew.h" int main () { glewExperimental = GL_TRUE; return 0; } Here is the output: Process finished with exit code -1073741515 (0xC0000135) When the 'glewExperimental' line is commented out, program exits with 0. Here is the CMake file (I am using CLion): cmake_minimum_required(VERSION 2.8.4) project(untitled) add_definitions(-DGL_GLEXT_PROTOTYPES) add_definitions(-DWINVER=0x0602) add_definitions(-D_WIN32_WINNT=0x0602) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(SOURCE_FILES main.cpp) add_executable(untitled ${SOURCE_FILES}) target