Category : clion

Hello I am struggling with linking a library into assignment project and I can’t move forward without it. irrKlang is the library I’m trying to use and I already included directory and it seems that the header file works. But it’s not enough for it to work properly. And how to link it in cmake? ..

Read more

I have tried to add cURl to my C++ project but I don’t know to add third-party libraries especially in Clion. After I downloaded cURL files I have copied its file to my MinGW folder (Bin to Bin, Include to Include,…) but I have these errors what should I do?! My code: #include <curl/curl.h> #include ..

Read more

I have installed zlib-1.2.3.exe. I have the following settings in CLion 2020.1: I have the following lines in my CMakeLists.txt file: cmake_minimum_required(VERSION 3.16) project(ZLIB__test) set(CMAKE_CXX_STANDARD 11) set(ZLIB_LIBRARY "C:/Program Files (x86)/GnuWin32") set(ZLIB_INCLUDE_DIR "C:/Program Files (x86)/GnuWin32/include") include_directories(${ZLIB_INCLUDE_DIR}) add_executable(ZLIB__test main.cpp) I have the following source code in main.cpp: #include <cstdio> #include <zlib.h> // Demonstration of zlib utility functions ..

Read more

I’m setting up a C++17 + boost 1.76.0 project in Clion 2018.3, with this minimal code: #include <boost/asio/ip/tcp.hpp> int main(int argc, char **argv) { auto const address = boost::asio::ip::make_address(argv[1]); return 0; } In my CMakeLists.txt I have correctly setup the C++ version: add_definitions(-std=c++17) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") And the project compiles and run fine. ..

Read more

I just installed opencv on my MacBook Air (M1) and imported "opencv.h" to my code using CLion, but an error occurred while I run the code: /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake –build /Users/zdw/CLionProjects/testCLion/cmake-build-debug –target testCLion — -j 6 Scanning dependencies of target testCLion [ 33%] Building CXX object CMakeFiles/testCLion.dir/main.cpp.o [ 66%] Linking CXX executable testCLion Undefined symbols for architecture ..

Read more