SDL_sound icon indicating copy to clipboard operation
SDL_sound copied to clipboard

Add support for UWP Compilation target

Open MrcSnm opened this issue 2 years ago • 6 comments

If you understand how to do that, I would appreciate if you could add that support, I'm developing a Xbox game using SDL_Sound.

I'll try my best at compiling it for UWP too, if I succeed before you, I may PR, but I know that should be a kid's play for you

MrcSnm avatar Oct 01 '21 21:10 MrcSnm

How can I solve FATAL_ERROR,SDL2::SDL2 and/or SDL2::SDL2main don't seem to contain any kind of IMPORTED_IMPLIB* or IMPORTED_LOCATION* CMake Error at C:/Users/Hipreme/Documents/Redist/SDL2-2.0.16/SDL2Config.cmake:94 (get_filename_component) ?

It is related to not finding SDL2Targets.cmake. My folder does not have it, but IDK how to find it anyway

MrcSnm avatar Oct 03 '21 14:10 MrcSnm

I was able to generate SDL2Targets.cmake by:

cmake --configure sdlDir cmake --build . --target install

It would be really enlightening having those build instructions somewhere. But I still need to find how to make SDL_Sound build now

It seems that after having installed it in C:/Program Files(x86)/SDL2 it was able then to being find automatically

I needed opening Visual Studio solution and manually adding SDL2 to its include paths and its lib paths

So, the dll generated gets the error code 126 for some reason, although that doesn't happen with the SDL build

MrcSnm avatar Oct 03 '21 19:10 MrcSnm

So I discovered that the problem seems to be that it dependends on kernel32.dll, if you guys have any idea on how to solve that, I would be happy

MrcSnm avatar Oct 05 '21 01:10 MrcSnm

(sorry for keeping this in limbo for too long.)

Discovery of SDL for MSVC can be a pain, I guess.

As for kernel32.dll dependency: SDL_sound doesn't advertise such dependency, so I'm guessing that it comes from the existing SDL2 devel package. Is linking to kernel32.lib not supported in UWP??

I am clueless with UWP though -- this is for @icculus, I guess.

sezero avatar Apr 14 '22 14:04 sezero

I'd have to check this on an actual Windows install, but as far as I know, SDL_sound itself has no dependency on kernel32 (SDL2 itself absolutely does, though).

Although maybe the playsound test program does, since it uses stdio and such?

icculus avatar Apr 14 '22 16:04 icculus

@sezero Nope, kernel32 is not available in the platforms UWP is meant to support. AFAICT SDL_Sound wasn't able to work on the platform I tested. Idk maybe I wasn't able to fully integrate the SDL_Sound project on VS uwp project?

MrcSnm avatar Apr 14 '22 17:04 MrcSnm