Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. #include <SDL2/SDL.h>
  5.  
  6. static const int width = 320;
  7. static const int height = 180;
  8.  
  9. int main(int argc, char **argv)
  10. {
  11. SDL_Init(SDL_INIT_VIDEO);
  12.  
  13. SDL_Window *window = SDL_CreateWindow("Hello, SDL2", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, SDL_WINDOW_OPENGL);
  14.  
  15. SDL_DestroyWindow(window);
  16. SDL_Quit();
  17.  
  18. return 0;
  19. }
  20.  
  21. vke@komputilo:~/dev/MiaLudo/source$ gcc -g main.c -o ../ludo
  22. /tmp/ccfVU5ua.o: In function `main':
  23. /home/vke/dev/MiaLudo/source/main.c:11: undefined reference to `SDL_Init'
  24. /home/vke/dev/MiaLudo/source/main.c:13: undefined reference to `SDL_CreateWindow'
  25. /home/vke/dev/MiaLuvke@komputilo:~/dev/MiaLudo/source$ gcc -g main.c -o ../ludo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement