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

Building without SDL currently breaks #1656

Closed
mid-kid opened this issue Jan 31, 2020 · 1 comment
Closed

Building without SDL currently breaks #1656

mid-kid opened this issue Jan 31, 2020 · 1 comment

Comments

@mid-kid
Copy link

mid-kid commented Jan 31, 2020

System info:
Gentoo 17.1 amd64
libsdl and libsdl2 both installed in system.

Steps to reproduce:

mkdir build
cd build
cmake -DBUILD_SDL=OFF ..
make
/home/mid-kid/mgba/src/platform/qt/InputController.cpp: In member function 'void QGBA::InputController::setPreferredGamepad(uint32_t, int)':
/home/mid-kid/mgba/src/platform/qt/InputController.cpp:275:76: error: 's_sdlEvents' was not declared in this scope
  275 | L_JoystickGetGUIDString(SDL_JoystickGetGUID(SDL_JoystickListGetPointer(&s_sdlEvent .joysticks, index)->joystick), name, sizeof(name));
      |                                                                         ^~~~~~~~~~

/home/mid-kid/mgba/src/platform/qt/InputController.cpp:275:48: error: 'SDL_JoystickListGetPointer' was not declared in this scope
  275 |  SDL_JoystickGetGUIDString(SDL_JoystickGetGUID(SDL_JoystickListGetPointer(&s_sdlEvents.joysticks, index)->joystick), name, sizeof(name));
      |                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/mid-kid/mgba/src/platform/qt/InputController.cpp:275:28: error: 'SDL_JoystickGetGUID' was not declared in this scope
  275 |  SDL_JoystickGetGUIDString(SDL_JoystickGetGUID(SDL_JoystickListGetPointer(&s_sdlEvents.joysticks, index)->joystick), name, sizeof(name));
      |                            ^~~~~~~~~~~~~~~~~~~
/home/mid-kid/mgba/src/platform/qt/InputController.cpp:275:2: error: 'SDL_JoystickGetGUIDString' was not declared in this scope
  275 |  SDL_JoystickGetGUIDString(SDL_JoystickGetGUID(SDL_JoystickListGetPointer(&s_sdlEvents.joysticks, index)->joystick), name, sizeof(name));
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [qt/CMakeFiles/mgba-qt.dir/build.make:584: qt/CMakeFiles/mgba-qt.dir/InputController.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:380: qt/CMakeFiles/mgba-qt.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

I think there's two options here: Either drop the SDL dependency for the Qt frontend, or don't allow BUILD_QT==ON && BUILD_SDL==OFF.

@lotharsm
Copy link
Member

I can confirm this for msys2/mingw-w64.

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

2 participants