Open heheda123123 opened 3 weeks ago
Bot detected the issue body's language is not English, translate it automatically.
Xmake version
latest
Windows 11
https://github.com/Chuyu-Team/YY-Thunks/releases After 1.0.9, the download link becomes
https://github.com/Chuyu-Team/YY-Thunks/releases/download/v1.1.1/YY-Thunks-1.1.1-Lib.zip
https://github.com/Chuyu-Team/YY-Thunks/releases/download/v1.1.1/YY-Thunks-1.1.1-Objs.zip
The one used in xmake.lua no longer exists and cannot be updated automatically.
https://github.com/Chuyu-Team/YY-Thunks/releases/download/v1.1.4/YY-Thunks-1.1.4-Binary.zip
1
1
1
对于模板c++项目,额外加一个add_ldflags("/SUBSYSTEM:CONSOLE,5.01")
就可以了
但是我自己的项目按照这个方法,加了之后会出现其他错误
可能是链接顺序的问题,但是add_linkorders不能对obj文件生效,咋处理呢
checking for C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\bin\HostX64\x86\link.exe ... ok
checking for flags (/SUBSYSTEM:CONSOLE,5.01) ... no
> link.exe "/SUBSYSTEM:CONSOLE,5.01" "-nologo" "-dynamicbase" "-nxcompat" "-machine:x86"
checkinfo: @programdir\core\sandbox\modules\os.lua:273: C:\Users\ADMINI~1\AppData\Local\Temp\.xmake\241111\_427933EB8CA440208DF99028CB6F6B30.obj : fatal error LNK1112: 模块计算机类型“x64”与目标计算机类型“x86”冲突
stack traceback:
[C]: in function 'error'
[@programdir\core\base\os.lua:1004]:
[@programdir\core\sandbox\modules\os.lua:273]: in function 'runv'
[@programdir\modules\detect\tools\link\has_flags.lua:28]:
checking for cl.exe ... C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\bin\HostX64\x86\cl.exe
checking for the c compiler (cc) ... cl.exe
build cache stats:
cache directory: build\.build_cache
cache hit rate: 0%
cache hit: 0
cache hit total time: 0.000s
cache miss: 0
cache miss total time: 0.000s
new cached files: 0
remote cache hit: 0
remote new cached files: 0
preprocess failed: 0
compile fallback count: 0
compile total time: 0.000s
[100%]: build ok, spent 0.766s
warning: add_ldflags("/SUBSYSTEM:CONSOLE,5.01") is ignored, please pass `{force = true}` or call `set_policy("check.auto_ignore_flags", false)` if you want to set it.
PS C:\Users\Administrator\code\letsgo>
我后面的新问题解决了,但是是手动去链接obj,再给设置子系统这句加上{force = true}
Bot detected the issue body's language is not English, translate it automatically.
My new question later is to manually link obj and then forcibly add
{force = true}
Xmake 版本
latest
操作系统版本和架构
windows 11
描述问题
有两个问题 1 下载链接发生了改变 https://github.com/Chuyu-Team/YY-Thunks/releases 从1.0.9之后下载链接变成了
之前xmake.lua里面用的已经不存在了,没法自动更新
2 现在的包设置了兼容xp但是没有生效 复现过程,创建一个项目
修改xmake.lua
构建
放到xp上运行会提示不是有效的win32程序
按照yy-thunks文档的说法,https://github.com/Chuyu-Team/YY-Thunks/blob/master/Readme.osc.md 原因可能有两个,一是没有把obj放到系统sdk之前,二是没有设置“所需的最低版本”
期待的结果
1
工程配置
1
附加信息和错误日志
1