-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
It crashes when I use zig build-lib to generate static library for msvc on windows #7066
Comments
It would be better if xmake would do this instead of separate commands:
Zig is crippled when it is unnecessarily forced to go through objects. Anyway, I have followed the steps to reproduce the issue, but I am stuck on xmake not passing
(Note that |
I hacked in
This is the same problem from #5825. xmake either needs to give build-exe the zig source files instead of objects, or it needs to pass -lkernel32 -lntdll. How can I test adding these flags with the lua script? |
I hacked the compiler to include -lkernel32 and -lntdll and got this output:
So I believe that the |
Ok, I will test it later. Thanks. |
If so, how to compile c/c++ and link other language files together? For example asm, objc, dlang and etc. |
For C/C++, you can put them into the command line too! 😁
For other objects, it's no problem - you can use zig as an archiver or linker, it will work fine (see it worked in #7066 (comment)) but you just have to add those flags to tell zig what subsystem and what libs to link. Most of the time if you are adding objects from other languages, they will depend on libc, in which case you can pass |
Ok, if zig really can’t know, I will pass these flags to zig, thank you. |
It works fine on local disk, but it still does not work on mounted share disk. (virtualbox/win7) But I think this should be a bug of llvm. 😄 |
example project: https://github.com/xmake-io/xmake/tree/master/tests/projects/zig/static_library
We can download xmake-latest.win64.exe install package to install xmake (dev version) from https://github.com/xmake-io/xmake/actions/runs/355512412
Then test this problem. (zig 0.7.0)
The text was updated successfully, but these errors were encountered: