3 ms·
I've seen it joked that with Proton, Win32 is a good stable ABI for gaming on Linux. Given that, and that I'm most comfortable developing on Linux and in C++,
by a_e_k 2y ago
I've seen it joked that with Proton, Win32 is a good stable ABI for gaming on Linux.
Given that, and that I'm most comfortable developing on Linux and in C++, does anyone have a good toolchain recommendation for cross compiling C++ to Windows from Linux? (Ideally something that I can point CMake at and get a build that I can test in Proton.)
- saurik 2y agoPretty much any distribution you are on is going to let you install mingw, but you should also be able to just use clang and ldd these days (though the header files and library stubs would still come from mingw, unless you want to just compile against an official Microsoft SDK).
- steeleduncan 2y agoMinGW works well (e.g. mingw-w64 in Debian/Ubuntu). It works well with CMake, you just need to pass CMake flags like -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-c++ -DCMAKE_C_COMPILER=x86_64-w64-mingw32-c Something like SDL or Raylib is useful for cross platform windowing and sound if you are writing games
- westurner 2y agoHey, TuxMath is written with SDL, though there's a separate JS port now IIUC. /? mingw: https://github.com/search?q=mingw&type=repositories https://github.com/search?q=mingw&type=repositories The msys2/MINGW-packages are PKGBUILD packages: https://github.com/msys2/MINGW-packages https://github.com/msys2/MINGW-packages : > Package scripts for MinGW-w64 targets to build under MSYS2. > [..., SDL, gles, glfw, egl, glbinding, cargo-c, gtest, cppunit, qt5, gtk4, icu, ki-i18n-qt5, SDL2_pango, jack2, gstreamer, ffmpeg, blender, gegl, gnome-text-editor, gtksourceview, kdiff3, libgit2, libusb, libressl, libsodium, libserialport, libslirp, hugo] PKGBUILD is a bash script packaging spec from Arch, which builds packages with makepkg. msys2/setup-msys2: https://github.com/msys2/setup-msys2 https://github.com/msys2/setup-msys2: > setup-msys2 is a GitHub Action (GHA) to setup an MSYS2 environment (i.e. MSYS, MINGW32, MINGW64, UCRT64, CLANG32, CLANG64 and/or CLANGARM64 shells) Though, if you're writing a 3d app/game, e.g. panda3d already builds for Windows, Mac, and Linux; and pygbag compiles panda3d to WASM, and there's also harfang-wasm, and TIL about leptos is more like React in Rust and should work for GUI apps, too. panda3d > Building applications: https://docs.panda3d.org/1.11/python/distribution/building-binaries#building-binaries https://docs.panda3d.org/1.11/python/distribution/building-b... https://github.com/topics/mingw https://github.com/topics/mingw : > nCine, win-sudo, drmingw debugger, mstorsjo/llvm-mingw: https://github.com/mstorsjo/llvm-mingw https://github.com/mstorsjo/llvm-mingw : > Address Sanitizer and Undefined Behaviour Sanitizer, LLVM Control Flow Guard -mguard=cf ; i686, x86_64, armv7 and arm64
- westurner 2y agomsys2/MINGW-packages: "[Wish] Add 3D library for Python" https://github.com/msys2/MINGW-packages/issues/21325 https://github.com/msys2/MINGW-packages/issues/21325 panda3d/panda3d: https://github.com/panda3d/panda3d https://github.com/panda3d/panda3d Before Steam for Linux, there was tuxmath. tux4kuds/tuxmath//mingw/ has CodeBlocks build config with mingw32 fwics: https://github.com/tux4kids/tuxmath/blob/master/mingw/tuxmath.cbp https://github.com/tux4kids/tuxmath/blob/master/mingw/tuxmat... Code::Blocks: https://en.m.wikipedia.org/wiki/Code::Blocks https://en.m.wikipedia.org/wiki/Code::Blocks There's a CMake build: https://github.com/tux4kids/tuxmath/blob/master/CMakeLists.txt https://github.com/tux4kids/tuxmath/blob/master/CMakeLists.t... But it says the autotools build is still it; configure.ac for autoconf and Makefile.am for automake SDL supports SVG since SDL_image 2.0.2 with IMG_LoadSVG_RW() and since SDL_image 2.6.0 with IMG_LoadSizedSVG_RW: https://wiki.libsdl.org/SDL2_image/IMG_LoadSizedSVG_RW https://wiki.libsdl.org/SDL2_image/IMG_LoadSizedSVG_RW conda-forge has SDL on Win/Mac/Lin. conda-forge/sdl2-feedstock: https://github.com/conda-forge/sdl2-feedstock https://github.com/conda-forge/sdl2-feedstock emscripten-forge does not yet have SDL or .*gl.* or tuxmath or bash or busybox: https://github.com/emscripten-forge/recipes/tree/main/recipes/recipes_emscripten https://github.com/emscripten-forge/recipes/tree/main/recipe... conda-forge/panda3d-feedstock / recipe/meta.yaml builds panda3d on Win, Mac, Lin, and Github Actions containers: https://github.com/conda-forge/panda3d-feedstock/blob/main/recipe/meta.yaml https://github.com/conda-forge/panda3d-feedstock/blob/main/r... : conda install -c conda-forge panda3d # mamba install panda3d # miniforge # pip install panda3d Panda3d docs > Distributing Panda3D Applications > Third-party dependencies lists a few libraries that I don't think are in the MSYS or conda-forge package repos: https://docs.panda3d.org/1.10/python/distribution/thirdparty-licenses https://docs.panda3d.org/1.10/python/distribution/thirdparty... What about math games on open source operating systems, Steam?
- westurner 2y agoA Manim renderer for [game engine] would be cool for school, and cool for STEM. "Render and interact with through Blender, o3de, panda3d ManimCommunity/manim#3362" https://github.com/ManimCommunity/manim/issues/3362 https://github.com/ManimCommunity/manim/issues/3362
- qalmakka 2y agoWell, CL.EXE works pretty well on Wine too.... It _technically_ breaks a few terms of the EULA, but that's not too bad though. This works pretty well: https://github.com/mstorsjo/msvc-wine https://github.com/mstorsjo/msvc-wine Use it alongside something like this CMake toolchain file: set(CMAKE_SYSTEM_NAME Windows) set(CMAKE_SYSTEM_PROCESSOR amd64) set(CMAKE_C_COMPILER cl) set(CMAKE_CXX_COMPILER cl) set(CMAKE_AR lib) set(CMAKE_LINKER link) set(CMAKE_MT mt) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) after adding the various scripts to path. If you want to speed up a little you can use `clang-cl` with the MSVC libraries, and it will work fine too.
- baq 2y ago> I've seen it joked that with Proton, Win32 is a good stable ABI for gaming on Linux. It's funny because it's quite literally true. Thanks Microsoft - unironically!
- sebazzz 2y agoWine is indeed the most stable Linux ABI. I downloaded Freddy Fish (ScummVM), but without visible error, but readable when launching from the CLI it failed due to some LLVM runtime lib not being present with the correct version. Instead of going through the pain that it always is on Arch to find and install the right version of the right package, I just selected the Windows version using Proton and called it a day. (Eventually I did figure out that I could modify the shell script to launch a ScummVM instance via flatpak instead of the bundled version)
- account42 2y agoWindows doesn't ship with any LLVM runtime libs either. The solution is the same in both cases: package your dependencies with the program. It's not particularly hard.
- account42 2y agoOnly if you consider HTML and JavaScript to be a good stable ABI for gaming on Windows.