Dr_Asik, on 28 September 2012 - 02:33, said:
I tried to compile your code on my Mint VM but I didn't have SDL installed, and I'm not sure how to properly install it on Linux.
sudo apt-get install libsdl-dev libsdl-image1.2-dev
Ubuntu / Mint's default version of GCC doesn't like it when -lSDL_image isn't right at the end of the line. So you'll need to move it to the end of the line in build:
Quote
gcc -o cosmos -O2 -march=native -s -pedantic -Wall `pkg-config --cflags --libs sdl` -lSDL_image main.c
to
gcc main.c -o cosmos -O2 -march=native -s -pedantic -Wall `pkg-config --cflags --libs sdl` -lSDL_image
should do it.
You'll probably have to change the video resolution in main.c if your host doesn't support 1080p. If it does support it, then just full screen the guest mint and it should work, albeit, not as smooth as a native machine.
Dr_Asik, on 28 September 2012 - 02:33, said:
That said SDL is obviously a quality and widely used library especially in the *.nix world
Yeah, I'm quite impressed with how easy it is to use. I might try writing a game in it, or perhaps a Stargate-esque wormhole simulator.
Dr_Asik, on 28 September 2012 - 02:33, said:
, but for my own needs I prefer to use higher-level, object-oriented APIs which allow me to focus on the application logic. For C++ I like
SFML, for C# I like
XNA/
MonoGame.
I haven't tried MonoGame before, but I'll take a look at it, thanks.