c++linuxwindowscudacross-platform

What is the easiest thing i can do to compile C++ CUDA code on Arch linux to Windows .exe?


I stumbled upon that issue while, it may be pretty easy to compile usual C++ code on Linux for windows executable, all of the dependencies required by my project are not "header-only" (for example TGUI, SFML, CUDA etc...), so they've got a lot of .lib and .dll files, how can i do that? I am using CMake to handle most of the work for me, but I basically can't get the required .dll/.lib files on my Linux machine

CUDA toolkit version - 12.8

OS - Arch Linux


Solution

  • The "easiest thing" would be to spin up a Windows virtual machine (or buy/setup a dedicated machine for the purpose) and just compile your code there. Cross compiling from one platform to another is always going to be a metric ton more complicated than just compiling natively on the target platform.