minart icon indicating copy to clipboard operation
minart copied to clipboard

Add instructions on how to compile native applications on windows

Open JD557 opened this issue 3 years ago • 3 comments

Native applications on windows require some custom flags to correctly link SDL and the SDL.dll files.

JD557 avatar Apr 15 '22 11:04 JD557

It might be better to first get https://github.com/indoorvivants/sn-vcpkg working on windows.

JD557 avatar Apr 09 '23 12:04 JD557

Meanwhile, I remember another reason why I originally opened this issue: I have no idea how compile a Windows (not console) application with Scala Native.

I think I need to pass -Xlinker /subsystem:windows to the linker and then do some magic to get sdl_main/WinMain to work as expected.

There are some notes in https://wiki.libsdl.org/SDL2/FAQWindows that might be helpful.

JD557 avatar May 27 '23 12:05 JD557

Created https://github.com/scala-native/scala-native/issues/3295 with some findings

JD557 avatar May 27 '23 15:05 JD557