[CMake - CLion - Curl] Not being able to add the libcurl package
Answered
My cmakelist.txt is like this:
cmake_minimum_required(VERSION 3.25)
project(untitled C)
set(CMAKE_C_STANDARD 11)
set(CURL_DIR "C:/Users/Tobiasz/.clion-vcpkg/vcpkg/installed/x64-windows/share/curl")
set(ZLIB_LIBRARY "C:/Users/Tobiasz/.clion-vcpkg/vcpkg/installed/x64-windows/lib/zlib.lib")
find_package(CURL CONFIG REQUIRED)
find_package(ZLIB REQUIRED)
add_executable(untitled main2.c)
target_link_libraries(untitled CURL::libcurl)
project(untitled C)
set(CMAKE_C_STANDARD 11)
set(CURL_DIR "C:/Users/Tobiasz/.clion-vcpkg/vcpkg/installed/x64-windows/share/curl")
set(ZLIB_LIBRARY "C:/Users/Tobiasz/.clion-vcpkg/vcpkg/installed/x64-windows/lib/zlib.lib")
find_package(CURL CONFIG REQUIRED)
find_package(ZLIB REQUIRED)
add_executable(untitled main2.c)
target_link_libraries(untitled CURL::libcurl)
I'm trying to add the CURL library to call an api using my C code. I've been trying to do that for the past two days and i feel like an idiot.
With this cmake setup, i get an exit code -1073741515 (0xC0000135)
Please sign in to leave a comment.
Hello!
Here is an instruction on how to add a package to CMakeLists.txt if you installed it through vcpkg integration in CLion - https://www.jetbrains.com/help/clion/package-management.html#start-using-package
As for exit code -1073741515 (0xC0000135), please see https://www.jetbrains.com/help/clion/qt-tutorial.html#troubleshooting. It's about Qt, but the main idea is the same.