elnormous / HTTPRequest

Single-header C++ HTTP request class
The Unlicense
942 stars 213 forks source link

Failed when compile with MSVC #71

Closed Haruma-VN closed 9 months ago

Haruma-VN commented 10 months ago

I tried to add the library and compile with MSVC (CXX 20) and this happened

image

I am using cmake, and here is the custom CMakeLists I wrote for it (Noticed that I add the subdirectory to the current project):

project(
    HTTPRequest
    VERSION 0
    HOMEPAGE_URL https://github.com/elnormous/HTTPRequest
    LANGUAGES CXX
)

add_library(
    ${PROJECT_NAME} INTERFACE
    ./HTTPRequest.hpp
)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)

Can you help me solve the current issue, thank you very much!

Haruma-VN commented 9 months ago

Nvm i solved it myself.