Linking CUDA with SDL2 on Windows

Hello World from the GPU!

I have many projects using SDL2 with and without the dll file, and have successfully compiled a simple CUDA program where it prompts the user to dynamically set the number of threads to cout a message many times in parallel. I have been trying to compile a cpp file that calls a function from a cu file but none of the makefiles I’ve tried compiled my project.

  • including crazy compiler flags.
  • reinstalling SDL2 many times with MYSYS2.
  • trying to compile both files with cl.
  • etc.

I’d be happy to provide the necessary information to get a working project combining SDL2 and CUDA!