I've tried a lot of different options and have done a lot of research but I'm really lost on how this is supposed to work.
What I have:
- C/C++ Game that uses openssl, glew, and sdl2
- My build.zig works perfectly when built natively on windows, linux86_64, and mac86_64
- the 3 dependencies are pulled from apt and homebrew and are prebuilt dlls on windows
What I'd like to do:
- Cross-compile executables for the above 3 platforms all from my windows environment
- Be able to add new targets I don't have native access to like aarch64-macos
Where I'm having trouble:
First test was just -Dtarget=x86_64-linux-gnu. First thing is missing the dependencies, so I copied them out of my debian install
Now SDL needs headers for X11. ok, copied those out as well.
Now SDL gets linker errors...... why? I would expect SDL2 to manage all of its own dependencies and not pass them onto my exe.
Now on windows I explicitly link to windows OS libraries like kernel32, user32, etc... is thie missing bit here needing those from my debian install too? I tried copying some over like X11.so and Xext.so but still getting several unresolved.
Is there a primer for full list of things I need to link my exe to so satisfy SDL'2 dependencies?
I feel like I'm getting close but just missing some of the final steps to getting this working right.
THeoretically I'd like to have these built in CI at some point which wouldnt even necessarily need to be a windows machine