4

I am using Linux Mint 15 as a guest on Virtualbox, hosted with Windows 7, 64-bit machine and OS (both Windows and Linux). I've installed the Guest Additions. I have also enabled 3D Acceleration.

I am trying to run the following:

int main(int argc, char** argv){
    if (SDL_Init(SDL_INIT_EVERYTHING) == -1){
    std::cout << SDL_GetError() << std::endl;
    return 1;
    }
return 0;
}

Really basic, just trying to see if this works, however I get the error:

No available video device

And I'm not sure what to do now or what I need to install.

Additional Details

I did compile SDL2 using CLang++ (personal preference) and as far as I know I've linked it properly;

  • I've added the SDL2 includes directory to C++ Compiler -> Includes, and
  • libSDL2.a (along with libdl and libptthread) into Build -> Linker

EDIT:

my glxinfo output

I actually have no idea if OpenGL works in VirtualBox either.

I would at the very least like to get a basic window up and running.

Alastair
  • 338
  • 2
  • 11
  • 1
    Unless SDL uses EGL, I am pretty sure you need an X server w/ GLX running on Linux for it to work. Can you include a little more information, for instance how your X server is configured? – Andon M. Coleman Sep 11 '13 at 21:55
  • Great question -- though I have no idea how to check that. I'm assuming that Gnome 3 uses X11 to work, so if that's the case, whatever the presets are (if they're even the same thing!). If I'm totally wrong on this, feel free to set me straight – Alastair Sep 11 '13 at 22:21
  • Oh that sucks. Too bad I can't cross-reference between both StackOverflow and Superuser. – Alastair Sep 11 '13 at 22:37
  • If nothing turns up the only other alternative I can think of is just trying a binary from apt-get or just saying "forget it" and do it in Windows/mingw instead. – Alastair Sep 11 '13 at 22:39
  • I did a little bit more digging and I came across this: http://stackoverflow.com/questions/4841908 . I think this might solve your problem, though if it does that has got to be the stupidest way of describing this error to an end-user: "No video device found." :) You'd think it'd mention a missing file, not a missing device. – Andon M. Coleman Sep 11 '13 at 23:02
  • It didn't work :( - I did try the apt-get instruction from http://lazyfoo.net/SDL_tutorials/lesson01/linux/ but this also didn't work. – Alastair Sep 12 '13 at 00:30
  • I also tried installing https://launchpad.net/~josebagar/+archive/sdl2/+build/4310261 which also didn't work (sigh) – Alastair Sep 12 '13 at 00:51
  • The error means that you are probably missing X11 *dev* headers (try for example: sudo apt-get install libx11-dev). When you run configure, pay attention to the messages it gives related to X. SDL2 has support for EGL and GLX under X11. – gabomdq Sep 24 '13 at 13:21
  • Thank you for digging this question out of the dustbin, however I did run that very command (and I double checked just now and it tells me I've got the newest version). I think the reality is that VirtualBox's OpenGL is just not all that dandy. If I dual boot I would probably have much better success. – Alastair Sep 27 '13 at 04:51

0 Answers0