View Single Post
  #1   (View Single Post)  
Old 1st September 2017
billy_bazooka billy_bazooka is offline
Port Guard
Join Date: Sep 2016
Posts: 13
Default SDL2 not working in netbsd - "no available video device"

since my sdl2 programs run slow in openbsd, and blazing fast in slackware, i decided to try them on netbsd 7.1

#include <stdio.h>
#include <stdlib.h>
#include <SDL.h>

void die (char *msg)
  fprintf (stderr, "err: %s\n", msg);
  exit (0x0f);

int main (int ac, char **av)
  if (SDL_Init (SDL_INIT_VIDEO))
    die (SDL_GetError ());
  puts ("SDL init -> OK");
  return 0;
compile it with
gcc testing.c -o testing `sdl2-config --libs --cflags`
and when i start it i get
err: No available video device
i am missing something really obvious here.. why cant it find a video device?
Reply With Quote