Fix for curl.lib not found?

acgetchell's Avatar

acgetchell

25 Aug, 2017 11:54 PM

  1. 1 Posted by acgetchell on 14 Jan, 2018 05:02 AM

    acgetchell's Avatar

    On the CMake front, fixing this was a matter of using CMake's FindCURL:

    #Curl
    find_package(CURL)
    if(!CURL_FOUND)
      message(FATAL_ERROR "Notice: This program requires the Curl library, and will not be compiled.")
    endif()

    And then adding ${CURL_LIBRARIES} to target_link_libraries for each executable, e.g.

    add_executable(cdt-opt src/cdt-opt.cpp ${PROJECT_SOURCE_DIR}/src/date/src/tz.cpp)
    target_link_libraries(cdt-opt ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ${CURL_LIBRARIES})

    In AppVeyor, I used conda to install a working version of Curl findable by CMake:

    conda install -c conda-forge curl -y

    This should be in the next release of my project (it's currently in feature/AppVeyor) once I work through the LNK2019 errors.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac