Closed hanasaki666 closed 7 months ago
Bot detected the issue body's language is not English, translate it automatically.
Title: When installing imgui v1.90.4, the error "LINK: fatal error LNK1561: The entry point must be defined" appears and the installation fails.
再试试,xrepo update-repo
Bot detected the issue body's language is not English, translate it automatically.
Try again,
xrepo update-repo
再试试,
xrepo update-repo
in xmake-repo:
-> imgui v1.90.4 [vulkan:y, sdl2_no_renderer:y, debug:y, toolchains:"clang-cl", runtimes:"MDd"]
please input: y (y/n/m)
y
checking for Microsoft Visual Studio (x64) version ... 2022
checking for LLVM Clang C/C++ Compiler (x64) version ... 18.1.2
=> install imgui v1.90.4 .. failed
LINK : warning LNK4098: 默认库“msvcrtd.lib”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
LINK : warning LNK4217:符号“fclose”(在“ libucrt.lib(fclose.obj)”中定义)已由“imgui.lib(imgui.cpp.obj)”(函数“"bool __cdecl ImFileClose(struct _iobuf *)" (?ImFileClose@@YA_NPEAU_iobuf@@@Z)”中)
导入
LINK : warning LNK4217:符号“qsort”(在“ libucrt.lib(qsort.obj)”中定义)已由“imgui.lib(imgui.cpp.obj)”(函数“"void __cdecl ImQsort(void *,unsigned __int64,unsigned __int64,int (__cdecl*)(void const *,void const *))" (?ImQsort@@YAXPEAX_K1P6AHPEBX2@Z@Z)”中)导入
LINK : warning LNK4286:符号“qsort”(在“libucrt.lib(qsort.obj)”中定义)已由“imgui.lib(imgui_widgets.cpp.obj)”导入
LINK : warning LNK4217:符号“qsort”(在“ libucrt.lib(qsort.obj)”中定义)已由“imgui.lib(imgui_demo.cpp.obj)”(函数“"void __cdecl ShowDemoWindowWidgets(void)" (?ShowDemoWindowWidgets@@YAXXZ)”中)导
入
LINK : warning LNK4286:符号“qsort”(在“libucrt.lib(qsort.obj)”中定义)已由“imgui.lib(imgui_draw.cpp.obj)”导入
LINK : warning LNK4217:符号“__acrt_iob_func”(在“ libucrt.lib(_file.obj)”中定义)已由“imgui.lib(imgui.cpp.obj)”(函数“"void __cdecl ImGui::Shutdown(void)" (?Shutdown@ImGui@@YAXXZ)”中)导入
LINK : warning LNK4217:符号“fflush”(在“ libucrt.lib(fflush.obj)”中定义)已由“imgui.lib(imgui.cpp.obj)”(函数“"unsigned int __cdecl ImGui::GetWindowResizeBorderID(struct ImGuiWindow *,int)" (?GetWindowResizeBorderID@ImGui@@YAIPEAUImGuiWindow@@H@Z)”中)导入
LINK : warning LNK4217:符号“__stdio_common_vsprintf”(在“ libucrt.lib(output.obj)”中定义)已由“imgui.lib(imgui.cpp.obj)”(函数“_vsnprintf_l”中)导入
LINK : warning LNK4286:符号“__stdio_common_vsprintf”(在“libucrt.lib(output.obj)”中定义)已由“imgui.lib(imgui_demo.cpp.obj)”导入
LINK : warning LNK4217:符号“malloc”(在“ libucrt.lib(malloc.obj)”中定义)已由“imgui.lib(imgui.cpp.obj)”(函数“"void * __cdecl MallocWrapper(unsigned __int64,void *)" (?MallocWrapper@@YAPEAX_KPEAX@Z)”中)导入
LINK : warning LNK4217:符号“free”(在“ libucrt.lib(free.obj)”中定义)已由“imgui.lib(imgui.cpp.obj)”(函数“"void __cdecl FreeWrapper(void *,void *)" (?FreeWrapper@@YAXPEAX0@Z)”中)导入
LINK : warning LNK4217:符号“__stdio_common_vfprintf”(在“ libucrt.lib(output.obj)”中定义)已由“imgui.lib(imgui.cpp.obj)”(函数“_vfprintf_l”中)导入
LINK : warning LNK4217:符号“strncmp”(在“ libucrt.lib(strncmp.obj)”中定义)已由“imgui.lib(imgui_widgets.cpp.obj)”(函数“"bool __cdecl ImGui::InputTextEx(char const *,char const *,char *,int,struct ImVec2 const &,int,int (__cdecl*)(struct ImGuiInputTextCallbackData *),void *)" (?InputTextEx@ImGui@@YA_NPEBD0PEADHAEBUImVec2@@HP6AHPEAUImGuiInputTextCallbackData@@@ZPEAX@Z)”中)导入
LINK : warning LNK4286:符号“strncmp”(在“libucrt.lib(strncmp.obj)”中定义)已由“imgui.lib(imgui_demo.cpp.obj)”导入
imgui.lib(imgui_tables.cpp.obj) : error LNK2001: 无法解析的外部符号 __imp__wassert
imgui.lib(imgui.cpp.obj) : error LNK2001: 无法解析的外部符号 __imp__wassert
编译时出现了以上的错误
去掉 set_toolchains("clang-cl")
如果用了包,windows 平台是跟 msvc 强绑定的,不支持切其他工具链
去掉 set_toolchains("clang-cl")
如果用了包,windows 平台是跟 msvc 强绑定的,不支持切其他工具链
但我以前用clang-cl是可行的啊,就是说现在windows用imgui只能支持msvc了?
刚去掉clang-cl编译了,安装时没任何问题,能正常安装
去掉 set_toolchains("clang-cl") 如果用了包,windows 平台是跟 msvc 强绑定的,不支持切其他工具链
但我以前用clang-cl是可行的啊,就是说现在windows用imgui只能支持msvc了?
clang-cl 对于 win 下的包从没特地支持过,但是如果有些包是 xmake 维护的,目前是能编译过得,而 cmake/meson 的包,是否能过,都是未定义行为。。看人品,这边没有专门做过适配和维护
去掉 set_toolchains("clang-cl") 如果用了包,windows 平台是跟 msvc 强绑定的,不支持切其他工具链
但我以前用clang-cl是可行的啊,就是说现在windows用imgui只能支持msvc了?
clang-cl 对于 win 下的包从没特地支持过,但是如果有些包是 xmake 维护的,目前是能编译过得,而 cmake/meson 的包,是否能过,都是未定义行为。。看人品,这边没有专门做过适配和维护
我就是用xrepo来安装的imgui包啊,以前是可行的,现在却编译不过了,看来windows下开发还是用msvc才最保守是吗?
Bot detected the issue body's language is not English, translate it automatically.
Remove set_toolchains("clang-cl")
If you use packages, the Windows platform is strongly bound to msvc and does not support switching to other tool chains.
Bot detected the issue body's language is not English, translate it automatically.
Remove set_toolchains("clang-cl")
If packages are used, the Windows platform is strongly bound to msvc and does not support switching to other tool chains.
But it was feasible for me to use clang-cl in the past, but now Windows can only support msvc using imgui?
Bot detected the issue body's language is not English, translate it automatically.
I just removed clang-cl and compiled it. There is no problem during installation and it can be installed normally.
Bot detected the issue body's language is not English, translate it automatically.
Remove set_toolchains("clang-cl") If packages are used, the Windows platform is strongly bound to msvc and does not support switching to other tool chains.
But it was feasible for me to use clang-cl in the past, but now Windows can only support msvc using imgui?
clang-cl has never specifically supported packages under win, but if some packages are maintained by xmake, they can currently be compiled. However, whether cmake/meson packages can be compiled is undefined behavior. . Judging from the character, there is no special adaptation and maintenance done here.
Bot detected the issue body's language is not English, translate it automatically.
Remove set_toolchains("clang-cl") If you use packages, the Windows platform is strongly bound to msvc and does not support switching to other tool chains.
But it was feasible for me to use clang-cl in the past, but now Windows can only support msvc using imgui?
clang-cl has never specifically supported packages under win, but if some packages are maintained by xmake, they can currently be compiled. However, whether cmake/meson packages can be compiled is undefined behavior. . It depends on the character. There is no special adaptation and maintenance done here.
I used xrepo to install the imgui package. It was possible before, but now it cannot be compiled. It seems that msvc is the most conservative way to develop under windows, right?
去掉 set_toolchains("clang-cl") 如果用了包,windows 平台是跟 msvc 强绑定的,不支持切其他工具链
但我以前用clang-cl是可行的啊,就是说现在windows用imgui只能支持msvc了?
clang-cl 对于 win 下的包从没特地支持过,但是如果有些包是 xmake 维护的,目前是能编译过得,而 cmake/meson 的包,是否能过,都是未定义行为。。看人品,这边没有专门做过适配和维护
我就是用xrepo来安装的imgui包啊,以前是可行的,现在却编译不过了,
刚说了,对win包切 clang-cl从没支持过,是否能过,全凭你运气。。以前是否可以,都不代表现在一定可以。。
看来windows下开发还是用msvc才最保守是吗?
只要不用包, 工具链随你切。。windows 下包强绑定 msvc ,仅仅只是这边人力,资源不够,没精力维护这么多 case
Bot detected the issue body's language is not English, translate it automatically.
Remove set_toolchains("clang-cl") If packages are used, the Windows platform is strongly bound to msvc and does not support switching to other tool chains.
But it was feasible for me to use clang-cl in the past, but now Windows can only support msvc using imgui?
clang-cl has never specifically supported packages under win, but if some packages are maintained by xmake, they can currently be compiled. However, whether cmake/meson packages can be compiled is undefined behavior. . Judging from the character, there is no special adaptation and maintenance done here.
I used xrepo to install the imgui package. It was possible before, but now it cannot be compiled.
As I said before, clang-cl has never supported win packaging. Whether you can pass it depends on your luck. . Whether it was possible before does not necessarily mean it is possible now. .
It seems that when developing under Windows, it is most conservative to use msvc, right?
As long as you don't need to package it, the tool chain can be cut as you like. . The package under windows is strongly bound to msvc. It only requires manpower here. The resources are not enough and there is no energy to maintain so many cases.
去掉 set_toolchains("clang-cl") 如果用了包,windows 平台是跟 msvc 强绑定的,不支持切其他工具链
但我以前用clang-cl是可行的啊,就是说现在windows用imgui只能支持msvc了?
clang-cl 对于 win 下的包从没特地支持过,但是如果有些包是 xmake 维护的,目前是能编译过得,而 cmake/meson 的包,是否能过,都是未定义行为。。看人品,这边没有专门做过适配和维护
我就是用xrepo来安装的imgui包啊,以前是可行的,现在却编译不过了,
刚说了,对win包切 clang-cl从没支持过,是否能过,全凭你运气。。以前是否可以,都不代表现在一定可以。。
看来windows下开发还是用msvc才最保守是吗?
只要不用包, 工具链随你切。。windows 下包强绑定 msvc ,仅仅只是这边人力,资源不够,没精力维护这么多 case
好吧,那我自己不用包搞搞imgui试试吧,感谢了
可以把包描述拷贝下来,针对自己工具链定制和调试。如果解决了问题,也可以反馈回社区
尽管对 clang-cl 包没特殊支持过,不过这个 imgui 包是 xmake.lua 维护的,之前是能够跑过。现在不行,是由于解决https://github.com/xmake-io/xmake/issues/4596#issuecomment-2014528801 这个 issue ,做的一些改动,给 break 了。。
Bot detected the issue body's language is not English, translate it automatically.
Remove set_toolchains("clang-cl") If packages are used, the Windows platform is strongly bound to msvc and does not support switching to other tool chains.
But it was feasible for me to use clang-cl in the past, but now Windows can only support msvc using imgui?
clang-cl has never specifically supported packages under win, but if some packages are maintained by xmake, they can currently be compiled. However, whether cmake/meson packages can be compiled is undefined behavior. . Judging from the character, there is no special adaptation and maintenance done here.
I used xrepo to install the imgui package. It was feasible before, but now it cannot be compiled.
As I said before, clang-cl has never supported win packages. Whether you can pass it depends on your luck. . Whether it was possible before does not necessarily mean it is possible now. .
It seems that when developing under Windows, it is most conservative to use msvc, right?
As long as you don’t need to package it, the tool chain can be cut as you like. . The package under windows is strongly bound to msvc. It only requires manpower here. The resources are not enough and there is no energy to maintain so many cases.
Okay, then I will try imgui without using the package myself. Thanks.
Bot detected the issue body's language is not English, translate it automatically.
You can copy the package description and customize and debug it for your own tool chain. If the problem is solved, you can also feedback it to the community
Bot detected the issue body's language is not English, translate it automatically.
Although there is no special support for the clang-cl package, this imgui package is maintained by xmake.lua and could be run before. It doesn't work now, because some changes were made to solve the issue https://github.com/xmake-io/xmake/issues/4596#issuecomment-2014528801, which broke the issue. .
可以把包描述拷贝下来,针对自己工具链定制和调试。如果解决了问题,也可以反馈回社区
主要是我本身没研究过c++的构建和包之类的东西呢,就单纯一直以来是用VS和xmake+vscode,或UE c++等这些来傻瓜式的使用c++而已,一下说让我来针对工具链定制和调试包描述这个我是真不知道要咋搞 我之所以不用msvc而是用clang-cl,也是为了在vscode上配合clangd有更好体验罢了,毕竟微软自家的c++插件是真不行
Bot detected the issue body's language is not English, translate it automatically.
You can copy the package description and customize and debug it for your own tool chain. If the problem is solved, you can also feedback it to the community
The main reason is that I have never studied the construction and packaging of C++. I have always used VS, xmake+vscode, or UE c++ to use C++ in a fool-like manner. Let me talk about the tools. Chain customization and debugging package description I really don’t know what to do
主要是我本身没研究过c++的构建和包之类的东西呢,就单纯一直以来是用VS和xmake+vscode,或UE c++等这些来傻瓜式的使用c++而已,一下说让我来针对工具链定制和调试包描述这个我是真不知道要咋搞
只是建议
我之所以不用msvc而是用clang-cl,也是为了在vscode上配合clangd有更好体验罢了,毕竟微软自家的c++插件是真不行
你用 msvc/clang 编译都可以使用 clangd,intellisense 和编译器基本是无关的
Bot detected the issue body's language is not English, translate it automatically.
The main reason is that I have never studied the construction and packaging of C++. I have always used VS, xmake+vscode, or UE c++ to use C++ in a fool-proof way. Let me talk about it. Toolchain customization and debugging package description I really don’t know what to do with this
Just a suggestion
The reason why I don’t use msvc but clang-cl is to have a better experience with clangd on vscode. After all, Microsoft’s own c++ plug-in is really not good.
You can use clangd when compiling with msvc/clang. Intellisense has basically nothing to do with the compiler.
尽管对 clang-cl 包没特殊支持过,不过这个 imgui 包是 xmake.lua 维护的,之前是能够跑过。现在不行,是由于解决#4596 (comment) 这个 issue ,做的一些改动,给 break 了。。
这个 break 的问题我修了,顺带让 cmake 包支持了 clang-cl ,但目前xmake-repo没有相关ci支撑和人力维护,哪些包都能过,全靠人品
Bot detected the issue body's language is not English, translate it automatically.
Although there is no special support for clang-cl package, this imgui package is maintained by xmake.lua and could be run before. It doesn't work now. It's because of some changes made to solve the issue #4596 (comment). .
I fixed this break problem, and incidentally made the cmake package support clang-cl. However, currently xmake-repo does not have relevant ci support and human maintenance. It can pass any package, it all depends on your character.
Xmake 版本
2.8.8+HEAD.d8e248255
操作系统版本和架构
Windows10 Version 22H2
描述问题
更新了clang版本到18.1.2,且将xmake和VS更新到最新版本后,编译项目时自动更新包,在安装imgui v1.90.4 [debug:y, sdl2_no_renderer:y, runtimes:"MDd", toolchains:"clang-cl", vulkan:y]时,出现“LINK : fatal error LNK1561: 必须定义入口点”错误,安装失败
期待的结果
可以按我对imgui的配置正常安装
工程配置
附加信息和错误日志