Skip to content
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

lld can't find libshlwapi.a when cross-compiling win32 C app from Linux #3711

Closed
AlexMax opened this issue Nov 18, 2019 · 0 comments
Closed
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. os-windows
Milestone

Comments

@AlexMax
Copy link

AlexMax commented Nov 18, 2019

Pretty simple. When I attempt to use

exe.linkSystemLibrary("shlwapi");

inside of a build.zig that cross-compiles from Linux to a i386-windows-gnu target, I get an error message from lld:

Build Dependencies...compiler_rt...Initialize...lld: error: could not open 'libshlwapi.a': No such file or directory

If I comment out that specific line, but leave other pertinent libraries like user32, I don't get an error about a missing library, but I do get an expected linker error about a missing symbol.

Indeed, doing a search for shlwapi in the lib/zig tree, I see no files, and no files contained in that subdirectory contain any mention of SHDeleteKey, the symbol I'm looking for, aside from the mingw header file. On the other hand, looking for a symbol in user32 like SetWindowPos results in a hit inside a file named user32.def.in. I see no such file for shlwapi.

@andrewrk andrewrk added this to the 0.6.0 milestone Nov 18, 2019
@andrewrk andrewrk added contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. labels Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. os-windows
Projects
None yet
Development

No branches or pull requests

3 participants