Skip to content

Building without SDL currently breaks #1656

Closed

Description

@mid-kid

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.

Activity

  1. lotharsm commented on Jan 31, 2020

    @lotharsm
    Member

    I can confirm this for msys2/mingw-w64.

  2. added a commit that references this issue on Feb 1, 2020
    c795067
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions