xmake-io / xmake-repo

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

运行库为MD时,能成功安装coost库,但使用coost的项目在编译时会出现链接错误 #2238

Closed hanasaki666 closed 1 year ago

hanasaki666 commented 1 year ago

Xmake 版本

xmake v2.7.9+HEAD.c87922676

操作系统版本和架构

Windows10 version 22H2

描述问题

运行库为MD时,能成功安装coost库,但使用coost的项目在编译时会出现链接错误:检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”

期待的结果

能在运行时为MD的程序中正常使用coost库

工程配置

add_rules("mode.debug", "mode.releasedbg", "mode.release")

set_languages("c++20")
set_toolchains("clang-cl")

if is_mode("debug") then
    add_defines("_DEBUG", "DEBUG")
    set_runtimes("MDd")
    add_requires("coost", {debug = true})
else
    set_runtimes("MD")
    add_requires("coost")
end

target("test")
    set_kind("binary")
    add_packages("coost")
    add_files("projects/src/*.cpp")

附加信息和错误日志

PS D:\Projects\ymei\test> xmake clean
PS D:\Projects\ymei\test> xmake -vD
[ 25%]: cache compiling.debug projects\src\main.cpp
clang-cl.exe -c -Zi -FS -Fdbuild\windows\x64\debug\compile.test.pdb -Od -std:c++20 -MDd -D_DEBUG -DDEBUG /EHsc -external:W0 -external:ID:\Cache\.xmake\packages\c\coost\v3.0.0\d4442a012d6c4d529ab9501c7f7560d1\include -Fobuild\.objs\test\windows\x64\debug\projects\src\main.cpp.obj projects\src\main.cpp
[ 50%]: linking.debug test.exe
D:\VisualStudio\VS2022\Enterprise\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\link.exe -nologo -dynamicbase -nxcompat -machine:x64 -libpath:D:\Cache\.xmake\packages\c\coost\v3.0.0\d4442a012d6c4d529ab9501c7f7560d1\lib -debug -pdb:build\windows\x64\debug\test.pdb co.lib -out:build\windows\x64\debug\test.exe build\.objs\test\windows\x64\debug\projects\src\main.cpp.obj
error: @programdir\modules\private\async\runjobs.lua:256: @programdir\actions\build\kinds\binary.lua:74: @programdir\modules\core\tools\link.lua:170: co.lib(json.cc.obj) : error LNK2038: 检
测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
co.lib(mem.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
co.lib(fast.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
co.lib(log.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
co.lib(os_win.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
co.lib(hook_win.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
co.lib(time_win.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
co.lib(fs_win.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
co.lib(fastring.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
co.lib(str.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
co.lib(stack_trace_win.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
co.lib(flag.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
co.lib(scheduler.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
co.lib(sock_win.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
co.lib(error.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
co.lib(io_event.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
co.lib(cout.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
co.lib(iocp.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::basic_ostream<char,struct std::char_traits<char> >::write(char const *,__int64)" (?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEBD_J@Z) 已经在 co.lib(flag.cc.obj) 中定义
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::basic_ostream<char,struct std::char_traits<char> >::put(char)" (?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z) 已经在 co.lib(flag.cc.obj) 中定义
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::basic_ostream<char,struct std::char_traits<char> >::flush(void)" (?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ) 已经在 co.lib(flag.cc.obj) 中定义
libcpmtd.lib(cout.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(cout.obj) : error LNK2005: "public: char __cdecl std::basic_ios<char,struct std::char_traits<char> >::widen(char)const " (?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z) 已经在 msvcprtd.lib(MSVCP140D.dll) 中定义
libcpmtd.lib(locale0.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(locale0.obj) : error LNK2005: "void __cdecl std::_Facet_Register(class std::_Facet_base *)" (?_Facet_Register@std@@YAXPEAV_Facet_base@1@@Z) 已经在 msvcprtd.lib(locale0_implib.obj) 中定义
libcpmtd.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Getgloballocale(void)" (?_Getgloballocale@locale@std@@CAPEAV_Locimp@12@XZ) 已经
在 msvcprtd.lib(MSVCP140D.dll) 中定义
libcpmtd.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,char const *)" (?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@PEBD@Z) 已经
在 msvcprtd.lib(MSVCP140D.dll) 中定义
libcpmtd.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_dtor(class std::_Locinfo *)" (?_Locinfo_dtor@_Locinfo@std@@SAXPEAV12@@Z) 已经在 msvcprtd.lib(MSVCP140D.dll) 中定义
libcpmtd.lib(ios.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(xlock.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(xlock.obj) : error LNK2005: "public: __cdecl std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QEAA@H@Z) 已经在 msvcprtd.lib(MSVCP140D.dll) 中定义
libcpmtd.lib(xlock.obj) : error LNK2005: "public: __cdecl std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QEAA@XZ) 已经在 msvcprtd.lib(MSVCP140D.dll) 中定义
libcpmtd.lib(nothrow.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(iosptrs.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(locale.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(xmtx.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(wlocale.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(xlocale.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(xstol.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(xstoul.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(xstoll.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(xstoull.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(xstrcoll.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(xdateord.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(xmbtowc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(xwctomb.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(xwctomb.obj) : error LNK2005: _Getcvt 已经在 msvcprtd.lib(MSVCP140D.dll) 中定义
libcpmtd.lib(xwcscoll.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(xwcsxfrm.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(xgetwctype.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(xtowlower.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(xtowupper.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(xstrxfrm.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(StlCompareStringA.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(StlCompareStringW.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(StlLCMapStringW.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
libcpmtd.lib(StlLCMapStringA.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MDd_DynamicDebug”(main.cpp.obj 中)
LINK : warning LNK4098: 默认库“libcmtd.lib”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
build\windows\x64\debug\test.exe : fatal error LNK1169: 找到一个或多个多重定义的符号

stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:913]:
    [@programdir\modules\core\tools\link.lua:170]: in function 'catch'
    [@programdir\core\sandbox\modules\try.lua:123]: in function 'try'
    [@programdir\modules\core\tools\link.lua:145]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]:
    [@programdir\core\tool\linker.lua:224]: in function 'link'
    [@programdir\actions\build\kinds\binary.lua:74]: in function 'callback'
    [@programdir\modules\core\project\depend.lua:193]: in function 'on_changed'
    [@programdir\actions\build\kinds\binary.lua:55]: in function '_do_link_target'
    [@programdir\actions\build\kinds\binary.lua:102]:
    [@programdir\actions\build\kinds\binary.lua:129]: in function '_link_target'
    [@programdir\actions\build\kinds\binary.lua:157]: in function 'jobfunc'
    [@programdir\modules\private\async\runjobs.lua:232]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [@programdir\modules\private\async\runjobs.lua:218]: in function 'cotask'
    [@programdir\core\base\scheduler.lua:404]:

stack traceback:
        [C]: in function 'error'
        @programdir\core\base\os.lua:913: in function 'os.raiselevel'
        (...tail calls...)
        @programdir\modules\private\async\runjobs.lua:256: in field 'catch'
        @programdir\core\sandbox\modules\try.lua:123: in global 'try'
        @programdir\modules\private\async\runjobs.lua:218: in upvalue 'cotask'
        @programdir\core\base\scheduler.lua:404: in function <@programdir\core\base\scheduler.lua:397>
waruqi commented 1 year ago

安装的 coost 包还是 MTd,你先执行下面的命令,给我看看完整 logs 呢

xmake update -s dev
xrepo remove --all -y coost
xmake f -cvD
xmake -rvD
hanasaki666 commented 1 year ago
> Active code page: 65001
PS D:\Projects\ymei\test> xmake update -s dev
update version dev from official source ..
  => download https://github.com/xmake-io/xmake.git .. ok
  => install script to D:\xmake .. ok
PS D:\Projects\ymei\test> xrepo remove --all -y coost
PS D:\Projects\ymei\test> xmake f -cvD
checking for platform ... windows
checking for architecture ... x64
checking for cl.exe ... D:\VisualStudio\VS2022\Enterprise\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\cl.exe
checking for Microsoft Visual Studio (x64) version ... 2022
checking for Microsoft C/C++ Compiler (x64) version ... 19.36.32535
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(unzip.exe -v), No such file or directory
checking for unzip ... no
checking for 7z ... D:\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
finding coost from xmake ..
checking for xmake::coost ... no
finding coost from vcpkg ..
finding coost from conan ..
finding coost 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 coost from system ..
checking for coost ... no
note: install or modify (m) these packages (pass -y to skip confirm)?
in xmake-repo:
  -> coost v3.0.0 [toolchains:"clang-cl", vs_runtime:"MD"]
please input: y (y/n/m)
y
checking for ping ... ok
pinging for the host(github.com) ... 1 ms
D:\xmake\winenv\bin\7z x -y v3.0.0.tar.gz -oC:\Users\jiajia\AppData\Local\Temp\.xmake\230626\_22B9D1C20F5D4F5080A4F19DF784C170.tar

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

Scanning the drive for archives:
1 file, 313677 bytes (307 KiB)

Extracting archive: v3.0.0.tar.gz
--
Path = v3.0.0.tar.gz
Type = gzip
Headers Size = 10

Everything is Ok

Size:       1720320
Compressed: 313677
D:\xmake\winenv\bin\7z x -y C:\Users\jiajia\AppData\Local\Temp\.xmake\230626\_22B9D1C20F5D4F5080A4F19DF784C170.tar\v3.0.0.tar -osource.tmp

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

Scanning the drive for archives:
1 file, 1720320 bytes (1680 KiB)

Extracting archive: C:\Users\jiajia\AppData\Local\Temp\.xmake\230626\_22B9D1C20F5D4F5080A4F19DF784C170.tar\v3.0.0.tar
--
Path = C:\Users\jiajia\AppData\Local\Temp\.xmake\230626\_22B9D1C20F5D4F5080A4F19DF784C170.tar\v3.0.0.tar
Type = tar
Physical Size = 1720320
Headers Size = 128512
Code Page = UTF-8

Everything is Ok

Folders: 23
Files: 225
Size:       1530793
Compressed: 1720320
checking for clang-cl.exe ... ok
checking for Microsoft Visual Studio (x64) version ... 2022
checking for LLVM Clang C/C++ Compiler (x64) version ... 16.0.6
xmake f --diagnosis --verbose -y -c --plat=windows --arch=x64 --mode=release --kind=static --vs=2022 --vs_runtime=MD --buildir=build_ab6e2c25
checking for cl.exe ... D:\VisualStudio\VS2022\Enterprise\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\cl.exe
checking for Microsoft Visual Studio (x64) version ... 2022
checking for Microsoft C/C++ Compiler (x64) version ... 19.36.32535
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
checking for cl.exe ... D:\VisualStudio\VS2022\Enterprise\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\cl.exe
checking for the c++ compiler (cxx) ... cl.exe
> D:\VisualStudio\VS2022\Enterprise\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\cl.exe -c -nologo -FoC:\Users\jiajia\AppData\Local\Temp\.xmake\230626\_8148FED62A9F4240841E90A4DA74EA70.o C:\Users\jiajia\AppData\Local\Temp\.xmake\230626\_2EB2C5E08EF94E7EBD1C7CF990F2A1F0.cpp
checking for cl.exe ... D:\VisualStudio\VS2022\Enterprise\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\cl.exe
checking for the c compiler (cc) ... cl.exe
> D:\VisualStudio\VS2022\Enterprise\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\cl.exe -c -nologo -FoC:\Users\jiajia\AppData\Local\Temp\.xmake\230626\_18A15BAFE87B4A308A153D3CF0C4D940.o C:\Users\jiajia\AppData\Local\Temp\.xmake\230626\_63129F2A62AA49F2BE505CE0966A4300.c
> checking for c includes(backtrace.h)
checkinfo: ...amdir\core\sandbox\modules\import\core\tool\compiler.lua:84: @programdir\modules\core\tools\cl.lua:649: _63129F2A62AA49F2BE505CE0966A4300.c
C:\Users\jiajia\AppData\Local\Temp\.xmake\230626\_63129F2A62AA49F2BE505CE0966A4300.c(2): fatal error C1083: 无法打开包括文件: “backtrace.h”: No such file or directory

stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:913]:
    [@programdir\modules\core\tools\cl.lua:649]: in function 'catch'
    [@programdir\core\sandbox\modules\try.lua:123]: in function 'try'
    [@programdir\modules\core\tools\cl.lua:588]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]:
    [@programdir\core\tool\compiler.lua:278]: in function 'compile'
    [...amdir\core\sandbox\modules\import\core\tool\compiler.lua:82]: in function 'compile'
    [@programdir\modules\lib\detect\check_cxsnippets.lua:246]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [@programdir\modules\lib\detect\check_cxsnippets.lua:240]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]:
    [@programdir\core\project\option.lua:178]: in function '_do_check_cxsnippets'
    [@programdir\core\project\option.lua:230]:
    [@programdir\core\project\option.lua:278]: in function '_check'
    [@programdir\core\project\option.lua:335]: in function 'check'
    [...dir\core\sandbox\modules\import\core\project\project.lua:107]: in function 'jobfunc'
    [@programdir\modules\private\async\runjobs.lua:232]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [@programdir\modules\private\async\runjobs.lua:218]: in function 'cotask'
    [@programdir\core\base\scheduler.lua:404]:

checking for libbacktrace ... no
> checking for c++ includes(cxxabi.h)
checkinfo: ...amdir\core\sandbox\modules\import\core\tool\compiler.lua:84: @programdir\modules\core\tools\cl.lua:649: _2EB2C5E08EF94E7EBD1C7CF990F2A1F0.cpp
C:\Users\jiajia\AppData\Local\Temp\.xmake\230626\_2EB2C5E08EF94E7EBD1C7CF990F2A1F0.cpp(2): fatal error C1083: 无法打开包括文件: “cxxabi.h”: No such file or directory

stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:913]:
    [@programdir\modules\core\tools\cl.lua:649]: in function 'catch'
    [@programdir\core\sandbox\modules\try.lua:123]: in function 'try'
    [@programdir\modules\core\tools\cl.lua:588]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]:
    [@programdir\core\tool\compiler.lua:278]: in function 'compile'
    [...amdir\core\sandbox\modules\import\core\tool\compiler.lua:82]: in function 'compile'
    [@programdir\modules\lib\detect\check_cxsnippets.lua:246]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [@programdir\modules\lib\detect\check_cxsnippets.lua:240]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]:
    [@programdir\core\project\option.lua:178]: in function '_do_check_cxsnippets'
    [@programdir\core\project\option.lua:230]:
    [@programdir\core\project\option.lua:278]: in function '_check'
    [@programdir\core\project\option.lua:335]: in function 'check'
    [...dir\core\sandbox\modules\import\core\project\project.lua:107]: in function 'jobfunc'
    [@programdir\modules\private\async\runjobs.lua:232]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [@programdir\modules\private\async\runjobs.lua:218]: in function 'cotask'
    [@programdir\core\base\scheduler.lua:404]:

checking for cxxabi ... no
checking for clang-cl.exe ... ok
checking for Microsoft Visual Studio (x64) version ... 2022
checking for LLVM Clang C/C++ Compiler (x64) version ... 16.0.6
checking for link.exe ... D:\VisualStudio\VS2022\Enterprise\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\link.exe
checking for the linker (ld) ... link.exe
generating include\co\config.h.in to build_ab6e2c25\..\include\co\config.h ..
checking for git ... ok
  > replace COOST_SHARED -> 0
generating include\co\config.h.in ... ok
configure
{
    arch = x64
    cxxabi = false
    host = windows
    vs = 2022
    vs_runtime = MD
    kind = static
    theme = default
    ccache = true
    libbacktrace = false
    clean = true
    mode = release
    with_libcurl = false
    with_openssl = false
    proxy_pac = pac.lua
    buildir = build_ab6e2c25
    ndk_stdcxx = true
    fpic = false
    plat = windows
    network = public
}
xmake build --diagnosis --verbose
generating include\co\config.h.in to build_ab6e2c25\..\include\co\config.h ..
  > replace COOST_SHARED -> 0
generating include\co\config.h.in ... cache
checking for clang-cl.exe ... ok
checking for the c++ compiler (cxx) ... clang-cl.exe
checking for the c++ compiler (cxx) ... clang-cl.exe
checking for the c++ compiler (cxx) ... clang-cl.exe
checking for the c++ compiler (cxx) ... clang-cl.exe
checking for the c++ compiler (cxx) ... clang-cl.exe
checking for the c++ compiler (cxx) ... clang-cl.exe
checking for the c++ compiler (cxx) ... clang-cl.exe
checking for the c++ compiler (cxx) ... clang-cl.exe
checking for the c++ compiler (cxx) ... clang-cl.exe
checking for the c++ compiler (cxx) ... clang-cl.exe
checking for flags (-O2) ... ok
> clang-cl.exe "-O2"
checking for flags (/EHsc) ... ok
> clang-cl.exe "/EHsc"
checking for flags (-DNDEBUG) ... ok
> clang-cl.exe "-DNDEBUG"
[  1%]: cache compiling.release src\co\co.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\co\co.cc.obj src\co\co.cc
[  1%]: cache compiling.release src\co\epoll\kqueue.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\co\epoll\kqueue.cc.obj src\co\epoll\kqueue.cc
[  1%]: cache compiling.release src\co\hook_win.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\co\hook_win.cc.obj src\co\hook_win.cc
[  1%]: cache compiling.release src\co\epoll\iocp.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\co\epoll\iocp.cc.obj src\co\epoll\iocp.cc
[  1%]: cache compiling.release src\co\scheduler.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\co\scheduler.cc.obj src\co\scheduler.cc
[  1%]: cache compiling.release src\co\sock_win.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\co\sock_win.cc.obj src\co\sock_win.cc
[  1%]: cache compiling.release src\co\io_event.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\co\io_event.cc.obj src\co\io_event.cc
[  1%]: cache compiling.release src\co\sock.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\co\sock.cc.obj src\co\sock.cc
[  1%]: cache compiling.release src\co\hook.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\co\hook.cc.obj src\co\hook.cc
[  1%]: cache compiling.release src\co\epoll\epoll.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\co\epoll\epoll.cc.obj src\co\epoll\epoll.cc
checking for flags (-fcolor-diagnostics) ... ok
> clang-cl.exe "-fcolor-diagnostics"
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[  3%]: cache compiling.release src\cout.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\cout.cc.obj src\cout.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[  7%]: cache compiling.release src\error.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\error.cc.obj src\error.cc
[  7%]: cache compiling.release src\fast.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\fast.cc.obj src\fast.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[  9%]: cache compiling.release src\fastring.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\fastring.cc.obj src\fastring.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 11%]: cache compiling.release src\flag.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\flag.cc.obj src\flag.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 13%]: cache compiling.release src\fs.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\fs.cc.obj src\fs.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 15%]: cache compiling.release src\fs_win.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\fs_win.cc.obj src\fs_win.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
In file included from src\co\epoll\iocp.cc:3:
src\co\epoll/iocp.h(69,9): warning: private field '_sched_id' is not used [-Wunused-private-field]
    int _sched_id;
        ^
1 warning generated.
[ 17%]: cache compiling.release src\hash\base64.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\hash\base64.cc.obj src\hash\base64.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 19%]: cache compiling.release src\hash\crc16.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\hash\crc16.cc.obj src\hash\crc16.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 21%]: cache compiling.release src\hash\md5.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\hash\md5.cc.obj src\hash\md5.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 23%]: cache compiling.release src\hash\murmur_hash.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\hash\murmur_hash.cc.obj src\hash\murmur_hash.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 26%]: cache compiling.release src\hash\nanoid.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\hash\nanoid.cc.obj src\hash\nanoid.cc
[ 26%]: cache compiling.release src\hash\sha256.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\hash\sha256.cc.obj src\hash\sha256.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 28%]: cache compiling.release src\hash\url.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\hash\url.cc.obj src\hash\url.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 30%]: cache compiling.release src\json.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\json.cc.obj src\json.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 32%]: cache compiling.release src\log\log.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\log\log.cc.obj src\log\log.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 34%]: cache compiling.release src\log\stack_trace.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\log\stack_trace.cc.obj src\log\stack_trace.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 36%]: cache compiling.release src\log\stack_trace_win.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\log\stack_trace_win.cc.obj src\log\stack_trace_win.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 38%]: cache compiling.release src\mem.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\mem.cc.obj src\mem.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 42%]: cache compiling.release src\os.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\os.cc.obj src\os.cc
[ 42%]: cache compiling.release src\os_win.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\os_win.cc.obj src\os_win.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 44%]: cache compiling.release src\path.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\path.cc.obj src\path.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 46%]: cache compiling.release src\so\http.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\so\http.cc.obj src\so\http.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 48%]: cache compiling.release src\so\rpc.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\so\rpc.cc.obj src\so\rpc.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
src\co\hook_win.cc(99,14): warning: field 'tb' will be initialized after field 'hook_sleep' [-Wreorder-ctor]
    Hook() : tb(14, 17), hook_sleep(true) {}
             ^~~~~~~~~~  ~~~~~~~~~~~~~~~~
             hook_sleep(true) tb(14, 17)
src\co\hook_win.cc(1365,5): warning: ISO C++11 does not allow conversion from string literal to 'PCHAR' (aka 'char *') [-Wwritable-strings]
    attach_hook(Sleep);
    ^
[ 50%]: cache compiling.release src\so\ssl.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\so\ssl.cc.obj src\so\ssl.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 51%]: cache compiling.release src\so\tcp.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\so\tcp.cc.obj src\so\tcp.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 53%]: cache compiling.release src\str.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\str.cc.obj src\str.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 55%]: cache compiling.release src\tasked.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\tasked.cc.obj src\tasked.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 57%]: cache compiling.release src\thread.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\thread.cc.obj src\thread.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 59%]: cache compiling.release src\time.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\time.cc.obj src\time.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 61%]: cache compiling.release src\time_win.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\time_win.cc.obj src\time_win.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 63%]: cache compiling.release src\unitest.cc
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\unitest.cc.obj src\unitest.cc
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 65%]: cache compiling.release src\log\StackWalker.cpp
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\log\StackWalker.cpp.obj src\log\StackWalker.cpp
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 67%]: cache compiling.release src\co\detours\creatwth.cpp
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\co\detours\creatwth.cpp.obj src\co\detours\creatwth.cpp
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 69%]: cache compiling.release src\co\detours\detours.cpp
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\co\detours\detours.cpp.obj src\co\detours\detours.cpp
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
[ 71%]: cache compiling.release src\co\detours\image.cpp
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\co\detours\image.cpp.obj src\co\detours\image.cpp
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
src\log\StackWalker.cpp(293,3): warning: typedef requires a name [-Wmissing-declarations]
  typedef struct IMAGEHLP_MODULE64_V3
  ^~~~~~~
src\log\StackWalker.cpp(322,3): warning: typedef requires a name [-Wmissing-declarations]
  typedef struct IMAGEHLP_MODULE64_V2
  ^~~~~~~
src\log\StackWalker.cpp(647,17): warning: enumeration value 'NumSymTypes' not handled in switch [-Wswitch]
[ 75%]: cache compiling.release src\co\detours\modules.cpp
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\co\detours\modules.cpp.obj src\co\detours\modules.cpp
[ 75%]: cache compiling.release src\co\detours\disasm.cpp
clang-cl.exe -c -W3 -O2 -std:c++11 -MT -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS /EHsc -DNDEBUG -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\co\detours\disasm.cpp.obj src\co\detours\disasm.cpp
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
checking for ml64.exe ... D:\VisualStudio\VS2022\Enterprise\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\ml64.exe
checking for the assember (as) ... ml64.exe
[ 76%]: compiling.release src\co\context\context_x64.asm
D:\VisualStudio\VS2022\Enterprise\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\ml64.exe -c -nologo -W3 -Iinclude -DWIN32_LEAN_AND_MEAN -D_WINSOCK_DEPRECATED_NO_WARNINGS -Fobuild_ab6e2c25\.objs\libco\windows\x64\release\src\co\context\context_x64.asm.obj src\co\context\context_x64.asm
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
src\co\detours\detours.cpp(88,9): warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma prefast(suppress:28940, "A bad pointer means this probably isn't a PE header.")
        ^
1 warning generated.
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
src\co\detours\disasm.cpp(331,5): warning: field 'm_bF3' will be initialized after field 'm_bVex' [-Wreorder-ctor]
    m_bF3(FALSE),
    ^~~~~~~~~~~~
    m_bEvex(FALSE)
src\co\detours\disasm.cpp(1600,5): warning: unused typedef '__C_ASSERT__' [-Wunused-local-typedef]
    C_ASSERT(ARRAYSIZE(CDetourDis::s_rceCopyTable0F) == 256);
    ^
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
src\co\detours\modules.cpp(152,9): warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma prefast(suppress:28752, "We don't do the unicode conversion for LoadLibraryExA.")
        ^
src\co\detours\modules.cpp(288,9): warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma prefast(suppress:28940, "A bad pointer means this probably isn't a PE header.")
        ^
2 warnings generated.
checking for link.exe ... D:\VisualStudio\VS2022\Enterprise\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\link.exe
checking for the static library archiver (ar) ... link.exe
[ 96%]: archiving.release co.lib
D:\VisualStudio\VS2022\Enterprise\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\link.exe -lib -nologo -machine:x64 /opt:ref /opt:icf -out:build_ab6e2c25\windows\x64\release\co.lib build_ab6e2c25\.objs\libco\windows\x64\release\src\co\context\context_x64.asm.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\co\co.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\co\epoll\epoll.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\co\epoll\iocp.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\co\epoll\kqueue.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\co\hook.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\co\hook_win.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\co\io_event.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\co\scheduler.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\co\sock.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\co\sock_win.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\cout.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\error.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\fast.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\fastring.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\flag.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\fs.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\fs_win.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\hash\base64.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\hash\crc16.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\hash\md5.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\hash\murmur_hash.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\hash\nanoid.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\hash\sha256.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\hash\url.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\json.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\log\log.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\log\stack_trace.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\log\stack_trace_win.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\mem.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\os.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\os_win.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\path.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\so\http.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\so\rpc.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\so\ssl.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\so\tcp.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\str.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\tasked.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\thread.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\time.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\time_win.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\unitest.cc.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\log\StackWalker.cpp.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\co\detours\creatwth.cpp.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\co\detours\detours.cpp.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\co\detours\image.cpp.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\co\detours\modules.cpp.obj build_ab6e2c25\.objs\libco\windows\x64\release\src\co\detours\disasm.cpp.obj
checking for clang-cl.exe ... ok
checking for the c compiler (cc) ... clang-cl.exe

build cache stats:
cache directory: build_ab6e2c25\.build_cache
cache hit rate: 0%
cache hit: 0
cache miss: 0
new cached files: 0
remote cache hit: 0
remote new cached files: 0
preprocess failed: 0
compile fallback count: 0

[100%]: build ok, spent 12.953s
xmake install -y --nopkgs -o D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2 --diagnosis --verbose
installing libco ..
installing libco to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2 ..
> copy build_ab6e2c25\windows\x64\release\co.lib to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\lib
> copy include\co\all.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\all.h
> copy include\co\array.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\array.h
> copy include\co\atomic.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\atomic.h
> copy include\co\byte_order.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\byte_order.h
> copy include\co\clist.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\clist.h
> copy include\co\closure.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\closure.h
> copy include\co\co\chan.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\co\chan.h
> copy include\co\co\event.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\co\event.h
> copy include\co\co\io_event.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\co\io_event.h
> copy include\co\co\mutex.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\co\mutex.h
> copy include\co\co\pool.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\co\pool.h
> copy include\co\co\sock.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\co\sock.h
> copy include\co\co\wait_group.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\co\wait_group.h
> copy include\co\co.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\co.h
> copy include\co\config.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\config.h
> copy include\co\config.h.in to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\config.h.in
> copy include\co\cout.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\cout.h
> copy include\co\def.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\def.h
> copy include\co\defer.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\defer.h
> copy include\co\error.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\error.h
> copy include\co\fast.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\fast.h
> copy include\co\fastream.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\fastream.h
> copy include\co\fastring.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\fastring.h
> copy include\co\flag.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\flag.h
> copy include\co\fs.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\fs.h
> copy include\co\god.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\god.h
> copy include\co\hash\base64.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\hash\base64.h
> copy include\co\hash\crc16.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\hash\crc16.h
> copy include\co\hash\md5.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\hash\md5.h
> copy include\co\hash\murmur_hash.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\hash\murmur_hash.h
> copy include\co\hash\nanoid.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\hash\nanoid.h
> copy include\co\hash\sha256.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\hash\sha256.h
> copy include\co\hash\url.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\hash\url.h
> copy include\co\hash.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\hash.h
> copy include\co\http.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\http.h
> copy include\co\json.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\json.h
> copy include\co\log.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\log.h
> copy include\co\lru_map.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\lru_map.h
> copy include\co\maybe.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\maybe.h
> copy include\co\mem.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\mem.h
> copy include\co\os.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\os.h
> copy include\co\path.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\path.h
> copy include\co\random.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\random.h
> copy include\co\rpc.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\rpc.h
> copy include\co\so.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\so.h
> copy include\co\ssl.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\ssl.h
> copy include\co\stl.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\stl.h
> copy include\co\str.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\str.h
> copy include\co\table.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\table.h
> copy include\co\tasked.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\tasked.h
> copy include\co\tcp.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\tcp.h
> copy include\co\thread.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\thread.h
> copy include\co\time.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\time.h
> copy include\co\unitest.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\unitest.h
> copy include\co\__\dtoa_milo.h to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\__\dtoa_milo.h
> copy LICENSE.md to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\LICENSE.md
> copy readme.md to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\readme.md
> copy readme_cn.md to D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include\co\readme_cn.md
install ok!
finding coost from xmake ..
checking for xmake::coost ... coost v3.0.0
{
  links = {
    "co"
  },
  linkdirs = {
    "D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\lib"
  },
  libfiles = {
    "D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\lib\co.lib"
  },
  version = "v3.0.0",
  sysincludedirs = {
    "D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include"
  },
  static = true
}

patching D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\lib\pkgconfig\coost.pc ..
checking for link.exe ... D:\VisualStudio\VS2022\Enterprise\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\link.exe
checking for the linker (ld) ... link.exe
checking for clang-cl.exe ... ok
checking for the c++ compiler (cxx) ... clang-cl.exe
checking for flags (/MD) ... ok
> clang-cl.exe "/MD"
checking for flags (cl_external_includedir) ... ok
> clang-cl.exe "-external:W0" "-external:ID:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include"
> clang-cl.exe -c /MD -std:c++11 -external:W0 -external:ID:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include -FoC:\Users\jiajia\AppData\Local\Temp\.xmake\230626\_67BC62EB97114D408F0604CFF4E6CE80.o C:\Users\jiajia\AppData\Local\Temp\.xmake\230626\_36B4B8558C684C79A8C7ECE1787A19DF.cpp
checking for flags (-fcolor-diagnostics) ... ok
> clang-cl.exe "-fcolor-diagnostics"
clang-cl: warning: argument unused during compilation: '-std:c++11' [-Wunused-command-line-argument]
> D:\VisualStudio\VS2022\Enterprise\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\link.exe -nologo -dynamicbase -nxcompat -machine:x64 -libpath:D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\lib co.lib -out:C:\Users\jiajia\AppData\Local\Temp\.xmake\230626\_67BC62EB97114D408F0604CFF4E6CE80.b C:\Users\jiajia\AppData\Local\Temp\.xmake\230626\_67BC62EB97114D408F0604CFF4E6CE80.o
> checking for c++ links(co)
> checking for c++ snippet(test)
  => install coost v3.0.0 .. ok
configure
{
    clean = true
    proxy_pac = pac.lua
    ndk_stdcxx = true
    mode = release
    buildir = build
    vs = 2022
    theme = default
    ccache = true
    host = windows
    arch = x64
    network = public
    kind = static
    plat = windows
}
PS D:\Projects\ymei\test> xmake -rvD
checking for the c++ compiler (cxx) ... clang-cl.exe
checking for flags (-O2) ... ok
> clang-cl.exe "-O2"
checking for flags (-std:c++20) ... ok
> clang-cl.exe "-std:c++20"
checking for flags (-DNDEBUG) ... ok
> clang-cl.exe "-DNDEBUG"
[ 25%]: cache compiling.release projects\src\main.cpp
clang-cl.exe -c -O2 -std:c++20 -MD /EHsc -external:W0 -external:ID:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\include -DNDEBUG -Fobuild\.objs\test\windows\x64\release\projects\src\main.cpp.obj projects\src\main.cpp
[ 50%]: linking.release test.exe
D:\VisualStudio\VS2022\Enterprise\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\link.exe -nologo -dynamicbase -nxcompat -machine:x64 -libpath:D:\Cache\.xmake\packages\c\coost\v3.0.0\ab6e2c25c51f46d49689d7c9ebfd7dc2\lib /opt:ref /opt:icf co.lib -out:build\windows\x64\release\test.exe build\.objs\test\windows\x64\release\projects\src\main.cpp.obj
error: @programdir\modules\private\async\runjobs.lua:256: @programdir\actions\build\kinds\binary.lua:74: @programdir\modules\core\tools\link.lua:170: co.lib(json.cc.obj) : error LNK2038: 检
测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
co.lib(mem.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
co.lib(fast.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
co.lib(log.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
co.lib(os_win.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
co.lib(hook_win.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
co.lib(time_win.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
co.lib(fs_win.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
co.lib(fastring.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
co.lib(str.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
co.lib(stack_trace_win.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
co.lib(flag.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
co.lib(scheduler.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
co.lib(sock_win.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
co.lib(error.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
co.lib(io_event.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
co.lib(cout.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
co.lib(iocp.cc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
msvcprt.lib(MSVCP140.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::basic_ostream<char,struct std::char_traits<char> >::write(char const *,__int64)" (?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEBD_J@Z) 已经在 co.lib(flag.cc.obj) 中定义
msvcprt.lib(MSVCP140.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::basic_ostream<char,struct std::char_traits<char> >::put(char)" (?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z) 已经在 co.lib(flag.cc.obj) 中定义
msvcprt.lib(MSVCP140.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::basic_ostream<char,struct std::char_traits<char> >::flush(void)" (?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ) 已经在 co.lib(flag.cc.obj) 中定义
libcpmt.lib(cout.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(cout.obj) : error LNK2005: "public: char __cdecl std::basic_ios<char,struct std::char_traits<char> >::widen(char)const " (?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z) 已经在 msvcprt.lib(MSVCP140.dll) 中定义
libcpmt.lib(locale0.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(locale0.obj) : error LNK2005: "void __cdecl std::_Facet_Register(class std::_Facet_base *)" (?_Facet_Register@std@@YAXPEAV_Facet_base@1@@Z) 已经在 msvcprt.lib(locale0_implib.obj) 中定义
libcpmt.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Getgloballocale(void)" (?_Getgloballocale@locale@std@@CAPEAV_Locimp@12@XZ) 已经 
在 msvcprt.lib(MSVCP140.dll) 中定义
libcpmt.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,char const *)" (?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@PEBD@Z) 已经 
在 msvcprt.lib(MSVCP140.dll) 中定义
libcpmt.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_dtor(class std::_Locinfo *)" (?_Locinfo_dtor@_Locinfo@std@@SAXPEAV12@@Z) 已经在 msvcprt.lib(MSVCP140.dll) 中定义
libcpmt.lib(ios.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(xlock.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(xlock.obj) : error LNK2005: "public: __cdecl std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QEAA@H@Z) 已经在 msvcprt.lib(MSVCP140.dll) 中定义
libcpmt.lib(xlock.obj) : error LNK2005: "public: __cdecl std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QEAA@XZ) 已经在 msvcprt.lib(MSVCP140.dll) 中定义
libcpmt.lib(iosptrs.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(locale.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(xmtx.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(wlocale.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(xlocale.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(xstol.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(xstoul.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(xstoll.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(xstoull.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(xstrcoll.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(xdateord.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(xmbtowc.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(xwctomb.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(xwctomb.obj) : error LNK2005: _Getcvt 已经在 msvcprt.lib(MSVCP140.dll) 中定义
libcpmt.lib(xwcscoll.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(xwcsxfrm.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(xgetwctype.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(xtowlower.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(xtowupper.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(xstrxfrm.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(StlCompareStringA.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(StlCompareStringW.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(StlLCMapStringW.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
libcpmt.lib(StlLCMapStringA.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(main.cpp.obj 中)
LINK : warning LNK4098: 默认库“libcmt.lib”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
build\windows\x64\release\test.exe : fatal error LNK1169: 找到一个或多个多重定义的符号

stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:913]:
    [@programdir\modules\core\tools\link.lua:170]: in function 'catch'
    [@programdir\core\sandbox\modules\try.lua:123]: in function 'try'
    [@programdir\modules\core\tools\link.lua:145]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]:
    [@programdir\core\tool\linker.lua:224]: in function 'link'
    [@programdir\actions\build\kinds\binary.lua:74]: in function 'callback'
    [@programdir\modules\core\project\depend.lua:193]: in function 'on_changed'
    [@programdir\actions\build\kinds\binary.lua:55]: in function '_do_link_target'
    [@programdir\actions\build\kinds\binary.lua:102]:
    [@programdir\actions\build\kinds\binary.lua:129]: in function '_link_target'
    [@programdir\actions\build\kinds\binary.lua:157]: in function 'jobfunc'
    [@programdir\modules\private\async\runjobs.lua:232]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:280]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [@programdir\modules\private\async\runjobs.lua:218]: in function 'cotask'
    [@programdir\core\base\scheduler.lua:404]:

stack traceback:
        [C]: in function 'error'
        @programdir\core\base\os.lua:913: in function 'base/os.raiselevel'
        (...tail calls...)
        @programdir\modules\private\async\runjobs.lua:256: in field 'catch'
        @programdir\core\sandbox\modules\try.lua:123: in global 'try'
        @programdir\modules\private\async\runjobs.lua:218: in upvalue 'cotask'
        @programdir\core\base\scheduler.lua:404: in function <@programdir\core\base\scheduler.lua:397>
waruqi commented 1 year ago

这个包自身项目里,vs runtime 写死了,外面没法动态改了。。

https://github.com/idealvin/coost/blob/65a1aa450298a937818aaabcff22d49d6aac2670/xmake.lua#L22

waruqi commented 1 year ago

再试下

xrepo update-repo
xrepo remove --all -y coost
xmake f -cvD
xmake -rvD
hanasaki666 commented 1 year ago

OK了,debug和release下编译都没问题了