Skip to content

WITH_CURL compile error #24

@JieSmart

Description

@JieSmart

使用 make WITH_CURL=yes DEFINES="CURL_STATICLIB"
之后报错

http/client/http_client.cpp: 在函数‘int __http_client_send(http_client_t*, HttpRequest*, HttpResponse*)’中:
http/client/http_client.cpp:201:60: 错误:‘CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE’在此作用域中尚未声明
         curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, (long)CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE);
                                                            ^
make[1]: *** [http/client/http_client.o] 错误 1
make[1]: 离开目录“/root/libhv”
make: *** [libhv] 错误 2

使用 cmake -DWITH_CURL=ON ..

-- Installing: /root/libhv/build/include/hv/http_client.h
CMake Error at examples/CMakeLists.txt:48 (target_link_libraries):
  Target "curl" of type EXECUTABLE may not be linked into another target.
  One may link only to INTERFACE, OBJECT, STATIC or SHARED libraries, or to
  executables with the ENABLE_EXPORTS property set.


CMake Error at examples/CMakeLists.txt:53 (target_link_libraries):
  Target "curl" of type EXECUTABLE may not be linked into another target.
  One may link only to INTERFACE, OBJECT, STATIC or SHARED libraries, or to
  executables with the ENABLE_EXPORTS property set.


-- Configuring incomplete, errors occurred!
See also "/root/libhv/build/CMakeFiles/CMakeOutput.log".
See also "/root/libhv/build/CMakeFiles/CMakeError.log".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions