Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for UWP Compilation target #29

Open
MrcSnm opened this issue Oct 1, 2021 · 6 comments
Open

Add support for UWP Compilation target #29

MrcSnm opened this issue Oct 1, 2021 · 6 comments

Comments

@MrcSnm
Copy link
Contributor

MrcSnm commented Oct 1, 2021

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
Copy link
Contributor Author

MrcSnm commented Oct 3, 2021

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
Copy link
Contributor Author

MrcSnm commented Oct 3, 2021

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
Copy link
Contributor Author

MrcSnm commented Oct 5, 2021

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

@sezero
Copy link
Collaborator

sezero commented Apr 14, 2022

(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.

@icculus
Copy link
Owner

icculus commented Apr 14, 2022

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?

@MrcSnm
Copy link
Contributor Author

MrcSnm commented Apr 14, 2022

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants