-
-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix x264 on windows with shared build #5344
Conversation
Although mingw64 recognises xxx.a and xxx.lib.a as import libraries, mingw32 only recognises xxx.lib.a as an import library. Therefore, only modify the generated msvc import library, not the mingw |
@star-hengxing 这个应该是没问题的,我试了删掉我的修改,发现以前的能过CI是mingw32的测试并没有执行test,仅仅是安装了mingw32。另外我试着打印x264的config.log发现x264在尝试使用-m64来测试,导致失败。出现找不到 c compiler的报错 |
@star-hengxing This should be no problem. I tried deleting my modifications and found that the previous test that could pass CI was mingw32 and did not execute the test, but only installed mingw32. In addition, I tried to print the config.log of x264 and found that x264 was trying to use -m64 to test, causing failure. An error message that the c compiler cannot be found appears. |
mingw32 的问题大概是 xmake bug。 在我的 pr 中,手动传 host 进去就没问题了 |
The problem with mingw32 is probably an xmake bug. In my PR, there is no problem if I manually pass the host into it. |
When x264 compiles dynamic libraries on Windows platform, it will generate libx264.dll.lib (msvc) or libx264.dll.a (mingw) import libraries.
However, configue has hardcoded -lx264 when generating x264.pc, so that libraries using pkgconfig can't find the symbols when linking x264 libraries.
Change the import library to libx264.lib (msvc) or libx264.a (mingw).