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

Cross compilation from Linux to Windows #866

Open
bluesillybeard opened this issue Feb 26, 2024 · 4 comments
Open

Cross compilation from Linux to Windows #866

bluesillybeard opened this issue Feb 26, 2024 · 4 comments

Comments

@bluesillybeard
Copy link
Contributor

Spinning up a Windows VM to export a project for Windows is a bit of a drag. Doing it from Linux with cross-compilation would save a ton of time and energy.

I don't know how this could be done, but I do know that it requires compiling with clang and/or mingw, adding cross-compilation to kmake, and linking required system libraries when those libraries don't actually exist on the host system.

A solid alternative is to compile Kinc ahead of time as a library (.lib), but that still requires going through the process on a Windows VM for every update.

For some context, I am creating a game engine that uses Kinc.

@RobDangerous
Copy link
Member

MingW does now work from what I've heard but if you use Direct3D (which is recommended) you will run into problems compiling shaders. For D3D12 you can probably make it work by using DXC instead of FXC.

@bluesillybeard
Copy link
Contributor Author

I'm mainly focused on getting Vulkan to work. The command I'm using is ./make --compile --lib --target windows --arch x86_64 --debug --graphics vulkan, which fails due to the Vulkan SDK not being present. The same command works fine on Windows.

@bluesillybeard
Copy link
Contributor Author

In a week or so I'll be able to focus my time into this, for now though I can't really help much.

@SunDaw
Copy link
Contributor

SunDaw commented Feb 28, 2024

The Vulkan SDK is neither part of MinGW nor Windows SDK - you will need to install that separately in either case. And on Windows Kinc expects to find the path to it via an environment variable (https://github.com/Kode/Kinc/blob/main/kfile.js#L111) - so you'd need to set that up first before running kmake (and I don't know how well that works for cross-compiling purposes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants