xmake-io / xmake-repo

📦 An official xmake package repository
https://xrepo.xmake.io
Apache License 2.0
687 stars 396 forks source link

Failed to install third-party library. #4980

Closed Lovelylavender4 closed 2 months ago

Lovelylavender4 commented 2 months ago

Xmake Version

xmake v2.9.4+HEAD.e85b001f1

Operating System Version and Architecture

Windows 11 23H2 22631.3880

Describe Bug

Installation of cpp-httplib v0.16.2 fails when using xmake project -k vsxmake.

Expected Behavior

Generate vsxmake normally

Project Configuration

add_rules("mode.debug", "mode.release")
add_rules("plugin.vsxmake.autoupdate")

add_repositories("liteldev-repo https://github.com/LiteLDev/xmake-repo.git")

-- Dependencies from xmake-repo.
add_requires("fmt")
add_requires("magic_enum")
add_requires("nlohmann_json")
add_requires("cpp-httplib", {configs = {ssl = true}})
add_requireconfs("cpp-httplib.openssl3", {override = true, version = "3.3.1"})
add_requires("uwebsockets", {configs = {zip = true}})
add_requireconfs("uwebsockets.usockets", {configs = {ssl = "openssl3"}})
add_requireconfs("uwebsockets.usockets.openssl3", {override = true, version = "3.3.1"})

-- Dependencies from liteldev-repo.
add_requires("pfr 2.1.1")
add_requires("expected-lite v0.7.0")
add_requires("ctre 3.8.1")

set_runtimes("MD")

target("SkyDreamBotBeta")
    set_kind("binary")
    add_files(
        "src/**.cpp",
        "src/**.ixx",
        "src/**.rc"
    )
    set_configdir("$(buildir)/config")
    set_configvar("SDB_WORKSPACE_FOLDER", "$(projectdir)")
    add_configfiles("src/(Version.h.in)")
    add_headerfiles(
        "src/**.inl","src/**.h"
    )
    add_includedirs(
        "src/", "$(buildir)/config"
    )
    add_cxflags(
        "/utf-8",
        "/permissive-",
        "/W4",
        "/w44265",
        "/w44289",
        "/w44296",
        "/w45263",
        "/w44738",
        "/w45204",
        "/experimental:module"
    )
    add_cxflags(
        "/EHs",
        "-Wno-microsoft-cast",
        "-Wno-invalid-offsetof",
        "-Wno-c++2b-extensions",
        "-Wno-microsoft-include",
        "-Wno-overloaded-virtual",
        "-Wno-ignored-qualifiers",
        "-Wno-potentially-evaluated-expression",
        "-Wno-pragma-system-header-outside-header",
        {tools = {"clang_cl"}}
    )
    add_defines(
        "_CRT_SECURE_NO_WARNINGS",
        "_ENABLE_CONSTEXPR_MUTEX_CONSTRUCTOR",
        "NOMINMAX",
        "UNICODE",
        "WIN32_LEAN_AND_MEAN"
    )
    add_packages(
        "fmt",
        "expected-lite",
        "magic_enum",
        "nlohmann_json",
        "cpp-httplib",
        "uwebsockets",
        "ctre",
        "pfr"
    )
    set_languages("c++23")
    set_symbols("debug")

    if is_mode("debug") then
        add_defines("_DEBUG")
        add_defines("SDB_DEBUG")
    end

    on_load(function (target)
        local tag = os.iorun("git describe --tags --abbrev=0 --always")
        local major, minor, patch, suffix = tag:match("v(%d+)%.(%d+)%.(%d+)(.*)")
        if not major then
            print("Failed to parse version tag, using 0.0.0")
            major, minor, patch = 0, 0, 0
        end
        if suffix then
            prerelease = suffix:match("-(.*)")
            if prerelease then
                prerelease = prerelease:gsub("\n", "")
            end
            if prerelease then
                target:set("configvar", "SDB_VERSION_PRERELEASE", prerelease)
            end
        end
        target:set("configvar", "SDB_VERSION_MAJOR", major)
        target:set("configvar", "SDB_VERSION_MINOR", minor)
        target:set("configvar", "SDB_VERSION_PATCH", patch)
    end)
target_end()

Additional Information and Error Logs

PS I:\root\ai\Feilulu\WorkArea\Programming\Lovelylavender4\SkyDreamBotBeta> $Env:http_proxy="http://127.0.0.1:33210";$Env:https_proxy="http://127.0.0.1:33210"
PS I:\root\ai\Feilulu\WorkArea\Programming\Lovelylavender4\SkyDreamBotBeta> xmake project -k vsxmake
checking for Microsoft Visual Studio (x64) version ... 2022
checking for Microsoft C/C++ Compiler (x64) version ... 19.42.34226.3
note: install or modify (m) these packages (pass -y to skip confirm)?
in xmake-repo:
  -> cpp-httplib v0.16.2 [ssl:y]
please input: y (y/n/m)
y
  => install cpp-httplib v0.16.2 .. failed

libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_DeregisterEventSource,函数 OPENSSL_showfatal 中引用了该符号
libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_RegisterEventSourceW,函数 OPENSSL_showfatal 中引用了该符号
libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_ReportEventW,函数 OPENSSL_showfatal 中引用了该符号
libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_GetProcessWindowStation,函数 OPENSSL_isservice 中引用了该符号
libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_GetUserObjectInformationW,函数 OPENSSL_isservice 中引用了该符号
libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_MessageBoxW,函数 OPENSSL_showfatal 中引用了该符号
libcrypto_static.lib(libdefault-lib-rand_win.obj) : error LNK2019: 无法解析的外部符号 __imp_CryptAcquireContextW,函数 ossl_pool_acquire_entropy 中引用了该符号
libcrypto_static.lib(libdefault-lib-rand_win.obj) : error LNK2019: 无法解析的外部符号 __imp_CryptReleaseContext,函数 ossl_pool_acquire_entropy 中引用了该符号
libcrypto_static.lib(libdefault-lib-rand_win.obj) : error LNK2019: 无法解析的外部符号 __imp_CryptGenRandom,函数 ossl_pool_acquire_entropy 中引用了该符号
C:\Users\Mirac\AppData\Local\Temp\.xmake\240818\_59CF006CD2C74230861C68ABFBDDD530.b : fatal error LNK1120: 9 个无法解析 的外部命令
if you want to get more verbose errors, please see:
  -> C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\installdir.failed\logs\install.txt
error: install failed!
PS I:\root\ai\Feilulu\WorkArea\Programming\Lovelylavender4\SkyDreamBotBeta> xmake project -k vsxmake -y -v
checking for cl.exe ... D:\app\important\Development\IDE\Visual Studio\2022\Preview\VC\Tools\MSVC\14.42.34226\bin\HostX64\x64\cl.exe
checking for Microsoft Visual Studio (x64) version ... 2022
checking for Microsoft C/C++ Compiler (x64) version ... 19.42.34226.3
checking for zig ... no
checking for zig ... no
checking for nim ... no
checking for nim ... no
checking for unzip ... no
checking for 7z ... C:\Program Files\xmake\winenv\bin\7z
checking for git ... ok
checking for gzip ... no
git rev-parse HEAD
git rev-parse HEAD
checking for cmake ... no
checking for cmake ... no
checking for cmake ... no
checking for cmake ... C:\Program Files\CMake\bin\cmake
checking for xmake::fmt ... fmt 11.0.2
checking for xmake::magic_enum ... magic_enum v0.9.6
checking for xmake::nlohmann_json ... nlohmann_json v3.11.3
checking for nasm ... no
checking for perl ... no
checking for strawberry-perl ... no
checking for jom.exe ... no
checking for jom ... no
checking for jom.exe ... no
checking for jom ... no
checking for xmake::openssl3 ... no
checking for xmake-repo::openssl3 ... openssl3 3.3.1
checking for xmake::cpp-httplib ... no
checking for pkg-config ... no
checking for pkgconf ... no
checking for cl.exe ... D:\app\important\Development\IDE\Visual Studio\2022\Preview\VC\Tools\MSVC\14.42.34226\bin\HostX64\x64\cl.exe
checking for the c compiler (cc) ... cl.exe
checking for cl.exe ... D:\app\important\Development\IDE\Visual Studio\2022\Preview\VC\Tools\MSVC\14.42.34226\bin\HostX64\x64\cl.exe
checking for the c++ compiler (cxx) ... cl.exe
checking for link.exe ... D:\app\important\Development\IDE\Visual Studio\2022\Preview\VC\Tools\MSVC\14.42.34226\bin\HostX64\x64\link.exe
checking for the linker (ld) ... link.exe
> checking for c links(cpp-httplib)
> checking for c snippet(find_package/cpp-httplib)
checking for cpp-httplib ... no
checking for xmake::libuv ... libuv v1.48.0
checking for xmake::usockets ... usockets v0.8.8
checking for xmake::zlib ... zlib v1.3.1
checking for xmake::libzip ... libzip v1.10.1
checking for xmake::uwebsockets ... uwebsockets v20.65.0
checking for xmake::pfr ... pfr 2.1.1
checking for xmake::expected-lite ... expected-lite v0.7.0
checking for xmake::ctre ... ctre 3.8.1
checking for ping ... ok
pinging the host(github.com) ... 292 ms
C:\Program Files\xmake\winenv\bin\7z x -y v0.16.2.tar.gz -oC:\Users\Mirac\AppData\Local\Temp\.xmake\240818\_749837ABF7AE4D3086878D56C2D812A0.tar

7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21

Scanning the drive for archives:
1 file, 1157538 bytes (1131 KiB)

Extracting archive: v0.16.2.tar.gz
--
Path = v0.16.2.tar.gz
Type = gzip
Headers Size = 10

Everything is Ok

Size:       7895040
Compressed: 1157538
C:\Program Files\xmake\winenv\bin\7z x -y C:\Users\Mirac\AppData\Local\Temp\.xmake\240818\_749837ABF7AE4D3086878D56C2D812A0.tar\v0.16.2.tar -osource.tmp

7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21

Scanning the drive for archives:
1 file, 7895040 bytes (7710 KiB)

Extracting archive: C:\Users\Mirac\AppData\Local\Temp\.xmake\240818\_749837ABF7AE4D3086878D56C2D812A0.tar\v0.16.2.tar
--
Path = C:\Users\Mirac\AppData\Local\Temp\.xmake\240818\_749837ABF7AE4D3086878D56C2D812A0.tar\v0.16.2.tar
Type = tar
Physical Size = 7895040
Headers Size = 51712
Code Page = UTF-8

Everything is Ok

Folders: 16
Files: 82
Size:       7822287
Compressed: 7895040
checking for cmake ... C:\Program Files\CMake\bin\cmake
checking for link.exe ... D:\app\important\Development\IDE\Visual Studio\2022\Preview\VC\Tools\MSVC\14.42.34226\bin\HostX64\x64\link.exe
checking for the static library archiver (ar) ... link.exe
checking for link.exe ... D:\app\important\Development\IDE\Visual Studio\2022\Preview\VC\Tools\MSVC\14.42.34226\bin\HostX64\x64\link.exe
checking for the shared library linker (sh) ... link.exe
C:\Program Files\CMake\bin\cmake -DHTTPLIB_COMPILE=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DHTTPLIB_REQUIRE_OPENSSL=ON -DHTTPLIB_REQUIRE_ZLIB=OFF -DHTTPLIB_REQUIRE_BROTLI=OFF -DHTTPLIB_NO_EXCEPTIONS=OFF -DCMAKE_INSTALL_PREFIX=C:\Users\Mirac\AppData\Local\.xmake\packages\c\cpp-httplib\v0.16.2\d56609da04044b6f922d01a2e88a922b -DCMAKE_INSTALL_LIBDIR:PATH=lib -G "Visual Studio 17 2022" -A x64 -DCMAKE_GENERATOR_TOOLSET=v143 -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL -DCMAKE_COMPILE_PDB_OUTPUT_DIRECTORY=pdb -DCMAKE_POSITION_INDEPENDENT_CODE=ON "-DCMAKE_CXX_FLAGS_RELEASE=/DWIN32 /D_WINDOWS /W3 /GR /EHsc  /O2 /Ob2 /DNDEBUG -MD" -DCMAKE_STATIC_LINKER_FLAGS_RELEASE=/machine:x64 "-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=/machine:x64 /INCREMENTAL:NO" "-DCMAKE_EXE_LINKER_FLAGS_RELEASE=/machine:x64 /INCREMENTAL:NO" "-DCMAKE_C_FLAGS_RELEASE=/DWIN32 /D_WINDOWS /W3  /O2 /Ob2 /DNDEBUG -MD" C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631.
-- The CXX compiler identification is MSVC 19.42.34226.3
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/app/important/Development/IDE/Visual Studio/2022/Preview/VC/Tools/MSVC/14.42.34226/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Found OpenSSL: optimized;D:/app/important/Library/OpenSSL-Win64/lib/VC/libcrypto64MD.lib;debug;D:/app/important/Library/OpenSSL-Win64/lib/VC/libcrypto64MDd.lib (found suitable version "3.3.1", minimum required is "3.0.0") found components: Crypto SSL
-- Configuring done (8.8s)
-- Generating done (0.0s)
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY
    CMAKE_C_FLAGS_RELEASE

-- Build files have been written to: C:/Users/Mirac/AppData/Local/.xmake/cache/packages/2408/c/cpp-httplib/v0.16.2/source/build_d56609da
checking for msbuild.exe ... D:\app\important\Development\IDE\Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\msbuild.exe
D:\app\important\Development\IDE\Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\msbuild.exe C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\httplib.sln -t:Rebuild /nr:false -nologo -m:18 -p:Configuration=Release -p:Platform=x64 /p:PlatformToolset=v143
生成启动时间为 2024/8/18 21:18:41。

     1>项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\httplib.sln”在节点 1 上(Rebuild 个目标)。
     1>ValidateSolutionConfiguration:
         正在生成解决方案配置“Release|x64”。
       ValidateProjects:
         在解决方案配置“Release|x64”中未选定生成项目“INSTALL”。
     1>项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\httplib.sln”(1)正在节点 2 上生成“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0
       .16.2\source\build_d56609da\ZERO_CHECK.vcxproj”(3) (Rebuild 个目标)。
     3>CoreClean:
         正在创建目录“x64\Release\ZERO_CHECK\”。
       PrepareForBuild:
         已启用结构化输出。编译器诊断的格式设置将反映错误层次结构。有关详细信息,请参阅 https://aka.ms/cpp/structured-output。
         正在创建目录“x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\”。
       InitializeBuildStatus:
         正在创建“x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild”,因为已指定“AlwaysCreate”。
         正在对“x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild”执行 Touch 任务。
       CustomBuild:
         1>Checking Build System
       FinalizeBuildStatus:
         正在删除文件“x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild”。
         正在对“x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate”执行 Touch 任务。
     3>已完成生成项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\ZERO_CHECK.vcxproj”(Rebuild 个目标)的操作。
     1>项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\httplib.sln”(1)正在节点 1 上生成“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0
       .16.2\source\build_d56609da\ALL_BUILD.vcxproj.metaproj”(2) (Rebuild 个目标)。
     2>项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\ALL_BUILD.vcxproj.metaproj”(2)正在节点 1 上生成“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c
       \cpp-httplib\v0.16.2\source\build_d56609da\ALL_BUILD.vcxproj”(4) (Rebuild 个目标)。
     4>CoreClean:
         正在创建目录“x64\Release\ALL_BUILD\”。
       PrepareForBuild:
         已启用结构化输出。编译器诊断的格式设置将反映错误层次结构。有关详细信息,请参阅 https://aka.ms/cpp/structured-output。
         正在创建目录“x64\Release\ALL_BUILD\ALL_BUILD.tlog\”。
       InitializeBuildStatus:
         正在创建“x64\Release\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild”,因为已指定“AlwaysCreate”。
         正在对“x64\Release\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild”执行 Touch 任务。
       CustomBuild:
         Building Custom Rule C:/Users/Mirac/AppData/Local/.xmake/cache/packages/2408/c/cpp-httplib/v0.16.2/source/CMakeLists.txt
       FinalizeBuildStatus:
         正在删除文件“x64\Release\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild”。
         正在对“x64\Release\ALL_BUILD\ALL_BUILD.tlog\ALL_BUILD.lastbuildstate”执行 Touch 任务。
     4>已完成生成项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\ALL_BUILD.vcxproj”(Rebuild 个目标)的操作。
     2>已完成生成项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\ALL_BUILD.vcxproj.metaproj”(Rebuild 个目标)的操作。
     1>已完成生成项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\httplib.sln”(Rebuild 个目标)的操作。

已成功生成。
    0 个警告
    0 个错误

已用时间 00:00:02.29
D:\app\important\Development\IDE\Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\msbuild.exe INSTALL.vcxproj -nologo -m:18 -p:Configuration=Release -p:Platform=x64 /p:PlatformToolset=v143
生成启动时间为 2024/8/18 21:18:44。

     1>节点 1 上的项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\INSTALL.vcxproj”(默认目标)。
     1>项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\INSTALL.vcxproj”(1)正在节点 1 上生成“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httpli
       b\v0.16.2\source\build_d56609da\ZERO_CHECK.vcxproj”(2) (默认目标)。
     2>PrepareForBuild:
         已启用结构化输出。编译器诊断的格式设置将反映错误层次结构。有关详细信息,请参阅 https://aka.ms/cpp/structured-output。
       InitializeBuildStatus:
         正在创建“x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild”,因为已指定“AlwaysCreate”。
         正在对“x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild”执行 Touch 任务。
       CustomBuild:
         所有输出均为最新。
         1>Checking Build System
       FinalizeBuildStatus:
         正在删除文件“x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild”。
         正在对“x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate”执行 Touch 任务。
     2>已完成生成项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\ZERO_CHECK.vcxproj”(默认目标)的操作。
     1>项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\INSTALL.vcxproj”(1)正在节点 2 上生成“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httpli
       b\v0.16.2\source\build_d56609da\ALL_BUILD.vcxproj”(3) (默认目标)。
     3>PrepareForBuild:
         已启用结构化输出。编译器诊断的格式设置将反映错误层次结构。有关详细信息,请参阅 https://aka.ms/cpp/structured-output。
       InitializeBuildStatus:
         正在创建“x64\Release\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild”,因为已指定“AlwaysCreate”。
         正在对“x64\Release\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild”执行 Touch 任务。
       CustomBuild:
         所有输出均为最新。
         Building Custom Rule C:/Users/Mirac/AppData/Local/.xmake/cache/packages/2408/c/cpp-httplib/v0.16.2/source/CMakeLists.txt
       FinalizeBuildStatus:
         正在删除文件“x64\Release\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild”。
         正在对“x64\Release\ALL_BUILD\ALL_BUILD.tlog\ALL_BUILD.lastbuildstate”执行 Touch 任务。
     3>已完成生成项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\ALL_BUILD.vcxproj”(默认目标)的操作。
     1>PrepareForBuild:
         正在创建目录“x64\Release\INSTALL\”。
         已启用结构化输出。编译器诊断的格式设置将反映错误层次结构。有关详细信息,请参阅 https://aka.ms/cpp/structured-output。
         正在创建目录“x64\Release\INSTALL\INSTALL.tlog\”。
       InitializeBuildStatus:
         正在创建“x64\Release\INSTALL\INSTALL.tlog\unsuccessfulbuild”,因为已指定“AlwaysCreate”。
         正在对“x64\Release\INSTALL\INSTALL.tlog\unsuccessfulbuild”执行 Touch 任务。
       CustomBuild:
         1>
       PostBuildEvent:
         setlocal
         "C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=Release -P cmake_install.cmake
         if %errorlevel% neq 0 goto :cmEnd
         :cmEnd
         endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
         :cmErrorLevel
         exit /b %1
         :cmDone
         if %errorlevel% neq 0 goto :VCEnd
         :VCEnd
         -- Install configuration: "Release"
         -- Installing: C:/Users/Mirac/AppData/Local/.xmake/packages/c/cpp-httplib/v0.16.2/d56609da04044b6f922d01a2e88a922b/include/httplib.h
         -- Installing: C:/Users/Mirac/AppData/Local/.xmake/packages/c/cpp-httplib/v0.16.2/d56609da04044b6f922d01a2e88a922b/lib/cmake/httplib/httplibConfig.cmake
         -- Installing: C:/Users/Mirac/AppData/Local/.xmake/packages/c/cpp-httplib/v0.16.2/d56609da04044b6f922d01a2e88a922b/lib/cmake/httplib/httplibConfigVersion.cmake
         -- Installing: C:/Users/Mirac/AppData/Local/.xmake/packages/c/cpp-httplib/v0.16.2/d56609da04044b6f922d01a2e88a922b/lib/cmake/httplib/FindBrotli.cmake
         -- Installing: C:/Users/Mirac/AppData/Local/.xmake/packages/c/cpp-httplib/v0.16.2/d56609da04044b6f922d01a2e88a922b/lib/cmake/httplib/httplibTargets.cmake
         -- Installing: C:/Users/Mirac/AppData/Local/.xmake/packages/c/cpp-httplib/v0.16.2/d56609da04044b6f922d01a2e88a922b/share/doc/httplib/README.md
         -- Installing: C:/Users/Mirac/AppData/Local/.xmake/packages/c/cpp-httplib/v0.16.2/d56609da04044b6f922d01a2e88a922b/share/licenses/httplib/LICENSE
       FinalizeBuildStatus:
         正在删除文件“x64\Release\INSTALL\INSTALL.tlog\unsuccessfulbuild”。
         正在对“x64\Release\INSTALL\INSTALL.tlog\INSTALL.lastbuildstate”执行 Touch 任务。
     1>已完成生成项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\INSTALL.vcxproj”(默认目标)的操作。

已成功生成。
    0 个警告
    0 个错误

已用时间 00:00:02.21
checking for xmake::cpp-httplib ... cpp-httplib v0.16.2
{
  license = "MIT",
  version = "v0.16.2",
  sysincludedirs = {
    "C:\Users\Mirac\AppData\Local\.xmake\packages\c\cpp-httplib\v0.16.2\d56609da04044b6f922d01a2e88a922b\include"
  },
  defines = "CPPHTTPLIB_OPENSSL_SUPPORT"
}

patching C:\Users\Mirac\AppData\Local\.xmake\packages\c\cpp-httplib\v0.16.2\d56609da04044b6f922d01a2e88a922b\lib\pkgconfig\cpp-httplib.pc ..
checking for D:\app\important\Development\IDE\Visual Studio\2022\Preview\VC\Tools\MSVC\14.42.34226\bin\HostX64\x64\cl.exe ... ok
checking for flags (-MD) ... ok
checking for flags (cl_external_includedir) ... ok
> checking for c++ includes(httplib.h)
> checking for c++ links(libssl_static, libcrypto_static)
> checking for c++ snippet(test)
error: libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_DeregisterEventSource,函数 OPENSSL_showfatal 中引用了该符号
libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_RegisterEventSourceW,函数 OPENSSL_showfatal 中引用了该符号
libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_ReportEventW,函数 OPENSSL_showfatal 中引用了该符号
libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_GetProcessWindowStation,函数 OPENSSL_isservice 中引用了该符号
libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_GetUserObjectInformationW,函数 OPENSSL_isservice 中引用了该符号
libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_MessageBoxW,函数 OPENSSL_showfatal 中引用了该符号
libcrypto_static.lib(libdefault-lib-rand_win.obj) : error LNK2019: 无法解析的外部符号 __imp_CryptAcquireContextW,函数 ossl_pool_acquire_entropy 中引用了该符号
libcrypto_static.lib(libdefault-lib-rand_win.obj) : error LNK2019: 无法解析的外部符号 __imp_CryptReleaseContext,函数 ossl_pool_acquire_entropy 中引用了该符号
libcrypto_static.lib(libdefault-lib-rand_win.obj) : error LNK2019: 无法解析的外部符号 __imp_CryptGenRandom,函数 ossl_pool_acquire_entropy 中引用了该符号
C:\Users\Mirac\AppData\Local\Temp\.xmake\240818\_B1E4AA980C1D47108C824C610D72C660.b : fatal error LNK1120: 9 个无法解析的外部命令

  => install cpp-httplib v0.16.2 .. failed
error: install failed!
star-hengxing commented 2 months ago

It should work https://github.com/xmake-io/xmake-repo/commit/83d42235b4d6a9316c90395922835068504d7395 😢

Lovelylavender4 commented 2 months ago

-vD

PS I:\root\ai\Feilulu\WorkArea\Programming\Lovelylavender4\SkyDreamBotBeta> xmake f -c -vD -y
checking for platform ... windows
checking for architecture ... x64
checking for cl.exe ... D:\app\important\Development\IDE\Visual Studio\2022\Preview\VC\Tools\MSVC\14.42.34226\bin\HostX64\x64\cl.exe
checking for Microsoft Visual Studio (x64) version ... 2022
checking for Microsoft C/C++ Compiler (x64) version ... 19.42.34226.3
checkinfo: cannot runv(zig.exe version), No such file or directory
checking for zig ... no
checkinfo: cannot runv(zig.exe version), No such file or directory
checking for zig ... no
checkinfo: cannot runv(nim.exe --version), No such file or directory
checking for nim ... no
checkinfo: cannot runv(nim.exe --version), No such file or directory
checking for nim ... no
checkinfo: cannot runv(unzip.exe -v), No such file or directory
checking for unzip ... no
checking for 7z ... C:\Program Files\xmake\winenv\bin\7z
checking for git ... ok
checkinfo: cannot runv(gzip.exe --version), No such file or directory
checking for gzip ... no
git rev-parse HEAD
git rev-parse HEAD
checking for cmake ... no
checking for cmake ... no
checking for cmake ... no
checking for cmake ... C:\Program Files\CMake\bin\cmake
finding fmt from xmake ..
checking for xmake::fmt ... fmt 11.0.2
finding magic_enum from xmake ..
checking for xmake::magic_enum ... magic_enum v0.9.6
finding nlohmann_json from xmake ..
checking for xmake::nlohmann_json ... nlohmann_json v3.11.3
checking for nasm ... no
checking for perl ... no
checking for strawberry-perl ... no
checking for jom.exe ... no
checking for jom ... no
checkinfo: cannot runv(jom.exe /?), No such file or directory
checking for jom.exe ... no
checkinfo: cannot runv(jom.exe /?), No such file or directory
checking for jom ... no
finding openssl3 from xmake ..
checking for xmake::openssl3 ... no
checking for xmake-repo::openssl3 ... openssl3 3.3.1
finding cpp-httplib from xmake ..
checking for xmake::cpp-httplib ... no
finding cpp-httplib from vcpkg ..
finding cpp-httplib from conan ..
finding cpp-httplib from pkgconfig ..
checkinfo: cannot runv(pkg-config.exe --version), No such file or directory
checking for pkg-config ... no
checkinfo: cannot runv(pkgconf.exe --version), No such file or directory
checking for pkgconf ... no
finding cpp-httplib from system ..
checking for cl.exe ... D:\app\important\Development\IDE\Visual Studio\2022\Preview\VC\Tools\MSVC\14.42.34226\bin\HostX64\x64\cl.exe
checking for the c compiler (cc) ... cl.exe
> "D:\\app\\important\\Development\\IDE\\Visual Studio\\2022\\Preview\\VC\\Tools\\MSVC\\14.42.34226\\bin\\HostX64\\x64\\cl.exe" -c -nologo -FoC:\Users\Mirac\AppData\Local\Temp\.xmake\240818\_5348774C65804340864C6AAED2FC72C0.o C:\Users\Mirac\AppData\Local\Temp\.xmake\240818\_775FB00633BC4F66BF87D39CCDE5CF30.c
checking for cl.exe ... D:\app\important\Development\IDE\Visual Studio\2022\Preview\VC\Tools\MSVC\14.42.34226\bin\HostX64\x64\cl.exe
checking for the c++ compiler (cxx) ... cl.exe
checking for link.exe ... D:\app\important\Development\IDE\Visual Studio\2022\Preview\VC\Tools\MSVC\14.42.34226\bin\HostX64\x64\link.exe
checking for the linker (ld) ... link.exe
> "D:\\app\\important\\Development\\IDE\\Visual Studio\\2022\\Preview\\VC\\Tools\\MSVC\\14.42.34226\\bin\\HostX64\\x64\\link.exe" -nologo -dynamicbase -nxcompat -machine:x64 cpp-httplib.lib -out:C:\Users\Mirac\AppData\Local\Temp\.xmake\240818\_5348774C65804340864C6AAED2FC72C0.b C:\Users\Mirac\AppData\Local\Temp\.xmake\240818\_5348774C65804340864C6AAED2FC72C0.o
> checking for c links(cpp-httplib)
> checking for c snippet(find_package/cpp-httplib)
checkinfo: ...gramdir\core\sandbox\modules\import\core\tool\linker.lua:75: @programdir\modules\core\tools\link.lua:175: LINK : fatal error LNK1181: 无法打开输入文件“cpp-httplib.lib”

stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:973]:
    [@programdir\modules\core\tools\link.lua:175]: in function 'catch'
    [@programdir\core\sandbox\modules\try.lua:123]: in function 'try'
    [@programdir\modules\core\tools\link.lua:150]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:275]:
    [@programdir\core\tool\linker.lua:222]: in function 'link'
    [...gramdir\core\sandbox\modules\import\core\tool\linker.lua:73]: in function 'link'
    [@programdir\modules\lib\detect\check_cxsnippets.lua:249]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:275]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [@programdir\modules\lib\detect\check_cxsnippets.lua:236]:
    [@programdir\modules\package\manager\system\find_package.lua:103]:
    [@programdir\modules\package\manager\find_package.lua:84]: in function '_find_package_with_builtin_rule'
    [@programdir\modules\package\manager\find_package.lua:130]: in function '_find_package'
    [@programdir\modules\package\manager\find_package.lua:194]:
    [@programdir\modules\lib\detect\find_package.lua:109]:
    [@programdir\core\package\package.lua:1852]: in function '_fetch_library'
    [@programdir\core\package\package.lua:2022]: in function 'fetch'
    [...modules\private\action\require\impl\install_packages.lua:335]: in function 'jobfunc'
    [@programdir\modules\async\runjobs.lua:241]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:275]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [@programdir\modules\async\runjobs.lua:223]: in function 'cotask'
    [@programdir\core\base\scheduler.lua:406]:

checking for cpp-httplib ... no
finding libuv from xmake ..
checking for xmake::libuv ... libuv v1.48.0
finding usockets from xmake ..
checking for xmake::usockets ... usockets v0.8.8
finding zlib from xmake ..
checking for xmake::zlib ... zlib v1.3.1
finding libzip from xmake ..
checking for xmake::libzip ... libzip v1.10.1
finding uwebsockets from xmake ..
checking for xmake::uwebsockets ... uwebsockets v20.65.0
finding pfr from xmake ..
checking for xmake::pfr ... pfr 2.1.1
finding expected-lite from xmake ..
checking for xmake::expected-lite ... expected-lite v0.7.0
finding ctre from xmake ..
checking for xmake::ctre ... ctre 3.8.1
checking for ping ... ok
pinging the host(github.com) ... 65535 ms
C:\Program Files\xmake\winenv\bin\7z x -y v0.16.2.tar.gz -oC:\Users\Mirac\AppData\Local\Temp\.xmake\240818\_B75B8FCACF5D4270895F33BDC4E2FEE0.tar

7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21

Scanning the drive for archives:
1 file, 1157538 bytes (1131 KiB)

Extracting archive: v0.16.2.tar.gz
--
Path = v0.16.2.tar.gz
Type = gzip
Headers Size = 10

Everything is Ok

Size:       7895040
Compressed: 1157538
C:\Program Files\xmake\winenv\bin\7z x -y C:\Users\Mirac\AppData\Local\Temp\.xmake\240818\_B75B8FCACF5D4270895F33BDC4E2FEE0.tar\v0.16.2.tar -osource.tmp

7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21

Scanning the drive for archives:
1 file, 7895040 bytes (7710 KiB)

Extracting archive: C:\Users\Mirac\AppData\Local\Temp\.xmake\240818\_B75B8FCACF5D4270895F33BDC4E2FEE0.tar\v0.16.2.tar
--
Path = C:\Users\Mirac\AppData\Local\Temp\.xmake\240818\_B75B8FCACF5D4270895F33BDC4E2FEE0.tar\v0.16.2.tar
Type = tar
Physical Size = 7895040
Headers Size = 51712
Code Page = UTF-8

Everything is Ok

Folders: 16
Files: 82
Size:       7822287
Compressed: 7895040
checking for cmake ... C:\Program Files\CMake\bin\cmake
checking for link.exe ... D:\app\important\Development\IDE\Visual Studio\2022\Preview\VC\Tools\MSVC\14.42.34226\bin\HostX64\x64\link.exe
checking for the static library archiver (ar) ... link.exe
checking for link.exe ... D:\app\important\Development\IDE\Visual Studio\2022\Preview\VC\Tools\MSVC\14.42.34226\bin\HostX64\x64\link.exe
checking for the shared library linker (sh) ... link.exe
C:\Program Files\CMake\bin\cmake -DHTTPLIB_COMPILE=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DHTTPLIB_REQUIRE_OPENSSL=ON -DHTTPLIB_REQUIRE_ZLIB=OFF -DHTTPLIB_REQUIRE_BROTLI=OFF -DHTTPLIB_NO_EXCEPTIONS=OFF -DCMAKE_INSTALL_PREFIX=C:\Users\Mirac\AppData\Local\.xmake\packages\c\cpp-httplib\v0.16.2\d56609da04044b6f922d01a2e88a922b -DCMAKE_INSTALL_LIBDIR:PATH=lib -G "Visual Studio 17 2022" -A x64 -DCMAKE_GENERATOR_TOOLSET=v143 -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL -DCMAKE_COMPILE_PDB_OUTPUT_DIRECTORY=pdb -DCMAKE_POSITION_INDEPENDENT_CODE=ON "-DCMAKE_C_FLAGS_RELEASE=/DWIN32 /D_WINDOWS /W3  /O2 /Ob2 /DNDEBUG -MD" "-DCMAKE_CXX_FLAGS_RELEASE=/DWIN32 /D_WINDOWS /W3 /GR /EHsc  /O2 /Ob2 /DNDEBUG -MD" "-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=/machine:x64 /INCREMENTAL:NO" "-DCMAKE_EXE_LINKER_FLAGS_RELEASE=/machine:x64 /INCREMENTAL:NO" -DCMAKE_STATIC_LINKER_FLAGS_RELEASE=/machine:x64 C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631.
-- The CXX compiler identification is MSVC 19.42.34226.3
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/app/important/Development/IDE/Visual Studio/2022/Preview/VC/Tools/MSVC/14.42.34226/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Found OpenSSL: optimized;D:/app/important/Library/OpenSSL-Win64/lib/VC/libcrypto64MD.lib;debug;D:/app/important/Library/OpenSSL-Win64/lib/VC/libcrypto64MDd.lib (found suitable version "3.3.1", minimum required is "3.0.0") found components: Crypto SSL
-- Configuring done (8.8s)
-- Generating done (0.0s)
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY
    CMAKE_C_FLAGS_RELEASE

-- Build files have been written to: C:/Users/Mirac/AppData/Local/.xmake/cache/packages/2408/c/cpp-httplib/v0.16.2/source/build_d56609da
checking for msbuild.exe ... D:\app\important\Development\IDE\Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\msbuild.exe
D:\app\important\Development\IDE\Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\msbuild.exe C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\httplib.sln -t:Rebuild /nr:false -nologo -m:18 -p:Configuration=Release -p:Platform=x64 /p:PlatformToolset=v143
生成启动时间为 2024/8/18 21:37:55。

     1>项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\httplib.sln”在节点 1 上(Rebuild 个目标)。
     1>ValidateSolutionConfiguration:
         正在生成解决方案配置“Release|x64”。
       ValidateProjects:
         在解决方案配置“Release|x64”中未选定生成项目“INSTALL”。
     1>项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\httplib.sln”(1)正在节点 2 上生成“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0
       .16.2\source\build_d56609da\ZERO_CHECK.vcxproj”(3) (Rebuild 个目标)。
     3>CoreClean:
         正在创建目录“x64\Release\ZERO_CHECK\”。
       PrepareForBuild:
         已启用结构化输出。编译器诊断的格式设置将反映错误层次结构。有关详细信息,请参阅 https://aka.ms/cpp/structured-output。
         正在创建目录“x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\”。
       InitializeBuildStatus:
         正在创建“x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild”,因为已指定“AlwaysCreate”。
         正在对“x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild”执行 Touch 任务。
       CustomBuild:
         1>Checking Build System
       FinalizeBuildStatus:
         正在删除文件“x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild”。
         正在对“x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate”执行 Touch 任务。
     3>已完成生成项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\ZERO_CHECK.vcxproj”(Rebuild 个目标)的操作。
     1>项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\httplib.sln”(1)正在节点 1 上生成“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0
       .16.2\source\build_d56609da\ALL_BUILD.vcxproj.metaproj”(2) (Rebuild 个目标)。
     2>项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\ALL_BUILD.vcxproj.metaproj”(2)正在节点 1 上生成“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c
       \cpp-httplib\v0.16.2\source\build_d56609da\ALL_BUILD.vcxproj”(4) (Rebuild 个目标)。
     4>CoreClean:
         正在创建目录“x64\Release\ALL_BUILD\”。
       PrepareForBuild:
         已启用结构化输出。编译器诊断的格式设置将反映错误层次结构。有关详细信息,请参阅 https://aka.ms/cpp/structured-output。
         正在创建目录“x64\Release\ALL_BUILD\ALL_BUILD.tlog\”。
       InitializeBuildStatus:
         正在创建“x64\Release\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild”,因为已指定“AlwaysCreate”。
         正在对“x64\Release\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild”执行 Touch 任务。
       CustomBuild:
         Building Custom Rule C:/Users/Mirac/AppData/Local/.xmake/cache/packages/2408/c/cpp-httplib/v0.16.2/source/CMakeLists.txt
       FinalizeBuildStatus:
         正在删除文件“x64\Release\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild”。
         正在对“x64\Release\ALL_BUILD\ALL_BUILD.tlog\ALL_BUILD.lastbuildstate”执行 Touch 任务。
     4>已完成生成项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\ALL_BUILD.vcxproj”(Rebuild 个目标)的操作。
     2>已完成生成项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\ALL_BUILD.vcxproj.metaproj”(Rebuild 个目标)的操作。
     1>已完成生成项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\httplib.sln”(Rebuild 个目标)的操作。

已成功生成。
    0 个警告
    0 个错误

已用时间 00:00:02.28
D:\app\important\Development\IDE\Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\msbuild.exe INSTALL.vcxproj -nologo -m:18 -p:Configuration=Release -p:Platform=x64 /p:PlatformToolset=v143
生成启动时间为 2024/8/18 21:37:57。

     1>节点 1 上的项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\INSTALL.vcxproj”(默认目标)。
     1>项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\INSTALL.vcxproj”(1)正在节点 1 上生成“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httpli
       b\v0.16.2\source\build_d56609da\ZERO_CHECK.vcxproj”(2) (默认目标)。
     2>PrepareForBuild:
         已启用结构化输出。编译器诊断的格式设置将反映错误层次结构。有关详细信息,请参阅 https://aka.ms/cpp/structured-output。
       InitializeBuildStatus:
         正在创建“x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild”,因为已指定“AlwaysCreate”。
         正在对“x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild”执行 Touch 任务。
       CustomBuild:
         所有输出均为最新。
         1>Checking Build System
       FinalizeBuildStatus:
         正在删除文件“x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild”。
         正在对“x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate”执行 Touch 任务。
     2>已完成生成项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\ZERO_CHECK.vcxproj”(默认目标)的操作。
     1>项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\INSTALL.vcxproj”(1)正在节点 2 上生成“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httpli
       b\v0.16.2\source\build_d56609da\ALL_BUILD.vcxproj”(3) (默认目标)。
     3>PrepareForBuild:
         已启用结构化输出。编译器诊断的格式设置将反映错误层次结构。有关详细信息,请参阅 https://aka.ms/cpp/structured-output。
       InitializeBuildStatus:
         正在创建“x64\Release\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild”,因为已指定“AlwaysCreate”。
         正在对“x64\Release\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild”执行 Touch 任务。
       CustomBuild:
         所有输出均为最新。
         Building Custom Rule C:/Users/Mirac/AppData/Local/.xmake/cache/packages/2408/c/cpp-httplib/v0.16.2/source/CMakeLists.txt
       FinalizeBuildStatus:
         正在删除文件“x64\Release\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild”。
         正在对“x64\Release\ALL_BUILD\ALL_BUILD.tlog\ALL_BUILD.lastbuildstate”执行 Touch 任务。
     3>已完成生成项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\ALL_BUILD.vcxproj”(默认目标)的操作。
     1>PrepareForBuild:
         正在创建目录“x64\Release\INSTALL\”。
         已启用结构化输出。编译器诊断的格式设置将反映错误层次结构。有关详细信息,请参阅 https://aka.ms/cpp/structured-output。
         正在创建目录“x64\Release\INSTALL\INSTALL.tlog\”。
       InitializeBuildStatus:
         正在创建“x64\Release\INSTALL\INSTALL.tlog\unsuccessfulbuild”,因为已指定“AlwaysCreate”。
         正在对“x64\Release\INSTALL\INSTALL.tlog\unsuccessfulbuild”执行 Touch 任务。
       CustomBuild:
         1>
       PostBuildEvent:
         setlocal
         "C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=Release -P cmake_install.cmake
         if %errorlevel% neq 0 goto :cmEnd
         :cmEnd
         endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
         :cmErrorLevel
         exit /b %1
         :cmDone
         if %errorlevel% neq 0 goto :VCEnd
         :VCEnd
         -- Install configuration: "Release"
         -- Installing: C:/Users/Mirac/AppData/Local/.xmake/packages/c/cpp-httplib/v0.16.2/d56609da04044b6f922d01a2e88a922b/include/httplib.h
         -- Installing: C:/Users/Mirac/AppData/Local/.xmake/packages/c/cpp-httplib/v0.16.2/d56609da04044b6f922d01a2e88a922b/lib/cmake/httplib/httplibConfig.cmake
         -- Installing: C:/Users/Mirac/AppData/Local/.xmake/packages/c/cpp-httplib/v0.16.2/d56609da04044b6f922d01a2e88a922b/lib/cmake/httplib/httplibConfigVersion.cmake
         -- Installing: C:/Users/Mirac/AppData/Local/.xmake/packages/c/cpp-httplib/v0.16.2/d56609da04044b6f922d01a2e88a922b/lib/cmake/httplib/FindBrotli.cmake
         -- Installing: C:/Users/Mirac/AppData/Local/.xmake/packages/c/cpp-httplib/v0.16.2/d56609da04044b6f922d01a2e88a922b/lib/cmake/httplib/httplibTargets.cmake
         -- Installing: C:/Users/Mirac/AppData/Local/.xmake/packages/c/cpp-httplib/v0.16.2/d56609da04044b6f922d01a2e88a922b/share/doc/httplib/README.md
         -- Installing: C:/Users/Mirac/AppData/Local/.xmake/packages/c/cpp-httplib/v0.16.2/d56609da04044b6f922d01a2e88a922b/share/licenses/httplib/LICENSE
       FinalizeBuildStatus:
         正在删除文件“x64\Release\INSTALL\INSTALL.tlog\unsuccessfulbuild”。
         正在对“x64\Release\INSTALL\INSTALL.tlog\INSTALL.lastbuildstate”执行 Touch 任务。
     1>已完成生成项目“C:\Users\Mirac\AppData\Local\.xmake\cache\packages\2408\c\cpp-httplib\v0.16.2\source\build_d56609da\INSTALL.vcxproj”(默认目标)的操作。

已成功生成。
    0 个警告
    0 个错误

已用时间 00:00:02.23
finding cpp-httplib from xmake ..
checking for xmake::cpp-httplib ... cpp-httplib v0.16.2
{
  defines = "CPPHTTPLIB_OPENSSL_SUPPORT",
  sysincludedirs = {
    "C:\Users\Mirac\AppData\Local\.xmake\packages\c\cpp-httplib\v0.16.2\d56609da04044b6f922d01a2e88a922b\include"
  },
  license = "MIT",
  version = "v0.16.2"
}

patching C:\Users\Mirac\AppData\Local\.xmake\packages\c\cpp-httplib\v0.16.2\d56609da04044b6f922d01a2e88a922b\lib\pkgconfig\cpp-httplib.pc ..
checking for D:\app\important\Development\IDE\Visual Studio\2022\Preview\VC\Tools\MSVC\14.42.34226\bin\HostX64\x64\cl.exe ... ok
checking for flags (-MD) ... ok
> cl.exe "-MD" "-nologo"
checking for flags (cl_external_includedir) ... ok
> cl.exe "-external:W0" "-external:IC:\Users\Mirac\AppData\Local\.xmake\packages\c\cpp-httplib\v0.16.2\d56609da04044b6f922d01a2e88a922b\include" "-nologo"
> "D:\\app\\important\\Development\\IDE\\Visual Studio\\2022\\Preview\\VC\\Tools\\MSVC\\14.42.34226\\bin\\HostX64\\x64\\cl.exe" -c -nologo -MD -std:c++11 -DCPPHTTPLIB_OPENSSL_SUPPORT /EHsc -external:W0 -external:IC:\Users\Mirac\AppData\Local\.xmake\packages\c\cpp-httplib\v0.16.2\d56609da04044b6f922d01a2e88a922b\include -external:W0 -external:ID:\app\important\Library\OpenSSL-Win64\include -FoC:\Users\Mirac\AppData\Local\Temp\.xmake\240818\_566BC9BC2F264F608F0CAE1AB9EE8D90.o C:\Users\Mirac\AppData\Local\Temp\.xmake\240818\_7D0C25F8195246278D1C039D74425C23.cpp
cl: 命令行 warning D9002 :忽略未知选项“-std:c++11”
> "D:\\app\\important\\Development\\IDE\\Visual Studio\\2022\\Preview\\VC\\Tools\\MSVC\\14.42.34226\\bin\\HostX64\\x64\\link.exe" -nologo -dynamicbase -nxcompat -machine:x64 -libpath:D:\app\important\Library\OpenSSL-Win64\lib libssl_static.lib libcrypto_static.lib -out:C:\Users\Mirac\AppData\Local\Temp\.xmake\240818\_566BC9BC2F264F608F0CAE1AB9EE8D90.b C:\Users\Mirac\AppData\Local\Temp\.xmake\240818\_566BC9BC2F264F608F0CAE1AB9EE8D90.o
> checking for c++ includes(httplib.h)
> checking for c++ links(libssl_static, libcrypto_static)
> checking for c++ snippet(test)
checkinfo: ...gramdir\core\sandbox\modules\import\core\tool\linker.lua:75: @programdir\modules\core\tools\link.lua:175: libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_DeregisterEventSource,函数 OPENSSL_showfatal 中引用了该符号
libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_RegisterEventSourceW,函数 OPENSSL_showfatal 中引用了该符号
libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_ReportEventW,函数 OPENSSL_showfatal 中引用了该符号
libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_GetProcessWindowStation,函数 OPENSSL_isservice 中引用了该符号
libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_GetUserObjectInformationW,函数 OPENSSL_isservice 中引用了该符号
libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_MessageBoxW,函数 OPENSSL_showfatal 中引用了该符号
libcrypto_static.lib(libdefault-lib-rand_win.obj) : error LNK2019: 无法解析的外部符号 __imp_CryptAcquireContextW,函数 ossl_pool_acquire_entropy 中引用了该符号
libcrypto_static.lib(libdefault-lib-rand_win.obj) : error LNK2019: 无法解析的外部符号 __imp_CryptReleaseContext,函数 ossl_pool_acquire_entropy 中引用了该符号
libcrypto_static.lib(libdefault-lib-rand_win.obj) : error LNK2019: 无法解析的外部符号 __imp_CryptGenRandom,函数 ossl_pool_acquire_entropy 中引用了该符号
C:\Users\Mirac\AppData\Local\Temp\.xmake\240818\_566BC9BC2F264F608F0CAE1AB9EE8D90.b : fatal error LNK1120: 9 个无法解析的外部命令

stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:973]:
    [@programdir\modules\core\tools\link.lua:175]: in function 'catch'
    [@programdir\core\sandbox\modules\try.lua:123]: in function 'try'
    [@programdir\modules\core\tools\link.lua:150]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:275]:
    [@programdir\core\tool\linker.lua:222]: in function 'link'
    [...gramdir\core\sandbox\modules\import\core\tool\linker.lua:73]: in function 'link'
    [@programdir\modules\lib\detect\check_cxsnippets.lua:249]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:275]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [@programdir\modules\lib\detect\check_cxsnippets.lua:236]:
    [...repositories\xmake-repo\packages\c\cpp-httplib\xmake.lua:79]: in function 'script'
    [...dir\modules\private\action\require\impl\utils\filter.lua:114]: in function 'call'
    [...dir\modules\private\action\require\impl\actions\test.lua:41]:
    [...\modules\private\action\require\impl\actions\install.lua:444]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:275]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [...\modules\private\action\require\impl\actions\install.lua:370]:
    [...modules\private\action\require\impl\install_packages.lua:491]: in function 'jobfunc'
    [@programdir\modules\async\runjobs.lua:241]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:275]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [@programdir\modules\async\runjobs.lua:223]: in function 'cotask'
    [@programdir\core\base\scheduler.lua:406]:

error: ...repositories\xmake-repo\packages\c\cpp-httplib\xmake.lua:79: ...gramdir\core\sandbox\modules\import\core\tool\linker.lua:75: @programdir\modules\core\tools\link.lua:175: libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_DeregisterEventSource,函数 OPENSSL_showfatal 中引用了该符号
libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_RegisterEventSourceW,函数 OPENSSL_showfatal 中引用了该符号
libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_ReportEventW,函数 OPENSSL_showfatal 中引用了该符号
libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_GetProcessWindowStation,函数 OPENSSL_isservice 中引用了该符号
libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_GetUserObjectInformationW,函数 OPENSSL_isservice 中引用了该符号
libcrypto_static.lib(libcrypto-lib-cryptlib.obj) : error LNK2019: 无法解析的外部符号 __imp_MessageBoxW,函数 OPENSSL_showfatal 中引用了该符号
libcrypto_static.lib(libdefault-lib-rand_win.obj) : error LNK2019: 无法解析的外部符号 __imp_CryptAcquireContextW,函数 ossl_pool_acquire_entropy 中引用了该符号
libcrypto_static.lib(libdefault-lib-rand_win.obj) : error LNK2019: 无法解析的外部符号 __imp_CryptReleaseContext,函数 ossl_pool_acquire_entropy 中引用了该符号
libcrypto_static.lib(libdefault-lib-rand_win.obj) : error LNK2019: 无法解析的外部符号 __imp_CryptGenRandom,函数 ossl_pool_acquire_entropy 中引用了该符号
C:\Users\Mirac\AppData\Local\Temp\.xmake\240818\_566BC9BC2F264F608F0CAE1AB9EE8D90.b : fatal error LNK1120: 9 个无法解析的外部命令

stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:973]:
    [@programdir\modules\core\tools\link.lua:175]: in function 'catch'
    [@programdir\core\sandbox\modules\try.lua:123]: in function 'try'
    [@programdir\modules\core\tools\link.lua:150]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:275]:
    [@programdir\core\tool\linker.lua:222]: in function 'link'
    [...gramdir\core\sandbox\modules\import\core\tool\linker.lua:73]: in function 'link'
    [@programdir\modules\lib\detect\check_cxsnippets.lua:249]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:275]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [@programdir\modules\lib\detect\check_cxsnippets.lua:236]:
    [...repositories\xmake-repo\packages\c\cpp-httplib\xmake.lua:79]: in function 'script'
    [...dir\modules\private\action\require\impl\utils\filter.lua:114]: in function 'call'
    [...dir\modules\private\action\require\impl\actions\test.lua:41]:
    [...\modules\private\action\require\impl\actions\install.lua:444]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:275]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [...\modules\private\action\require\impl\actions\install.lua:370]:
    [...modules\private\action\require\impl\install_packages.lua:491]: in function 'jobfunc'
    [@programdir\modules\async\runjobs.lua:241]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:275]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [@programdir\modules\async\runjobs.lua:223]: in function 'cotask'
    [@programdir\core\base\scheduler.lua:406]:

  => install cpp-httplib v0.16.2 .. failed
error: @programdir\core\main.lua:329: @programdir\modules\async\runjobs.lua:325: ...\modules\private\action\require\impl\actions\install.lua:506: install failed!
stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:973]:
    [...\modules\private\action\require\impl\actions\install.lua:506]: in function 'catch'
    [@programdir\core\sandbox\modules\try.lua:123]: in function 'try'
    [...\modules\private\action\require\impl\actions\install.lua:370]:
    [...modules\private\action\require\impl\install_packages.lua:491]: in function 'jobfunc'
    [@programdir\modules\async\runjobs.lua:241]:

stack traceback:
        [C]: in function 'error'
        @programdir\core\base\os.lua:973: in function 'os.raiselevel'
        (...tail calls...)
        @programdir\core\main.lua:329: in upvalue 'cotask'
        @programdir\core\base\scheduler.lua:406: in function <@programdir\core\base\scheduler.lua:399>
PS I:\root\ai\Feilulu\WorkArea\Programming\Lovelylavender4\SkyDreamBotBeta>
star-hengxing commented 2 months ago

Try add_requireconfs("**.openssl3", {system = false}) or remove D:/app/important/Library/OpenSSL-Win64 dir