Thank you for sharing... it looks like there are a few issues here we need to look at. For now the workaround looks like you need Microsoft's C++ build tools (MSVC plus the Windows SDK)
If you get it working please let me know and I can document that for others until we fix anything uptream in Roc's linker and/or roc-ray's linker inputs.
this reminds me of a feature I want to add at some point: we automatically analyze the host binary's dynamic dependencies and give a warning during platform development if they aren't listed somewhere explicit in the roc code, along with a URL of where to find them.
that way we could give more helpful errors in situations like this, plus it wouldn't be a surprise :sweat_smile:
The issue here is that Roc's linker args for MSCV don't follow the strict requirement like all the other targets, it assumes Microsoft Visual Studio is installed and looks for libraries at link time.
We currently hardcode in the linker /defaultlib:kernal32 ntdll msvcrt shell32 whereas every other targets usies -nostdlib etc
I've got Claude cooking a PR to make Windows MSVC conform like the others.
Richard Feldman said:
we automatically analyze the host binary's dynamic dependencies and give a warning during platform development if they aren't listed somewhere explicit in the roc code
I'll make a GH Issue
https://github.com/roc-lang/roc/issues/12067
I would much rather not have to install visual studio (afaik you have to install it to get the sdk and build tools)
Initially I wanted to make my own platform to use raylib but the process seemed quite convoluted. Is there a way to use roc where it doesn't take control of the building process?
Thanks
You can have the platform produce a library instead of an executable, and then use Zig or something else to do the linking.
But that is going down the path of your own platform (or modifying roc-ray)
I have a PR up that will fix this https://github.com/roc-lang/roc/pull/12068
But it might take a few days to land that and update roc-ray too
After that lands, you shouldn't need to install visual studio
I was able to use GitHub to build Windows executables for me in roc-ray using GitHub Actions. This is obviously less than ideal if you're ONLY developing on Windows, of course. I do most of my canvas apps in the browser as well as roc-ray: see https://github.com/showell/roc-apps/tree/master/canvas_apps
see also #show and tell > browser canvas apps (and roc-ray)
I do the wasm compiles from a linux droplet.
johan alley has marked this topic as resolved.
Last updated: Oct 15 2026 at 17:56 UTC