Stream: beginners

Topic: roc not able to link to windows libs


view this post on Zulip Devin Prothero (Nov 25 2025 at 19:06):

I wanted to try out the new compiler but I am getting a link error when I try to run roc .

roc main.roc
lld-link: error: could not open 'kernel32.lib': No such file or directory
lld-link: error: could not open 'ntdll.lib': No such file or directory
lld-link: error: could not open 'msvcrt.lib': No such file or directory
error: LLD linker failed to create executable

I built from source and I built the fx test platform as well.
When I run roc with the windows developer shell It can successfully link the libs but running in a regular shell causes the above error.

view this post on Zulip Luke Boswell (Nov 25 2025 at 19:09):

I thought those libs were available on every Windows machine by default.

view this post on Zulip Luke Boswell (Nov 25 2025 at 19:09):

Maybe there is something in the regular shelp where the environment variables aren't set.

view this post on Zulip Luke Boswell (Nov 25 2025 at 19:10):

This is helpful to know, I can look into it later and try to reproduce on my windows machine.

view this post on Zulip Devin Prothero (Nov 25 2025 at 19:20):

It must be something like that, because running with the developer console that preloads a bunch of extra env vars fixes the issue. Its just weird because I thought that zig build always linked those libs on windows.


Last updated: Nov 28 2025 at 12:16 UTC