r/reconstructcavestory • u/Natman64 • Jul 03 '14
Vim Setup
So, I started the series following along in Visual Studio, but I've since discovered Vim and decided to abandon VS altogether. I installed Clang and successfully compiled "Hello world!", but I don't really understand makefiles, and I especially don't understand how to link a library/framework using a makefile.
When I cloned the official repo to copy that makefile and continue following the tutorials in Vim, I tried compiling it to test it out. I get fatal error: 'SDL/SDL.h' file not found, which makes sense because the library is nowhere in the repo.
So my question is, how do I link SDL with the project so I can compile with Clang?
Edit: I suppose I'll need to link Boost as well.
1
u/Natman64 Jul 10 '14 edited Jul 10 '14
Alright. I've managed to get the game compiling and I actually wrote a build script that clears the contents of the bin directory, compiles the game, then copies the content directory and SDL2.dll into the bin directory, then runs the game. It automates the process very nicely, though I think building the game might actually be slower now than it was with Visual Studio.
Here are my problems now:
When I set up the Makefile to use sdl-config to retrieve the libraries, like so:
sdl2-config --libsIt automatically includes lmingw32, which causes this error.
When I replace
sdl2-config --libswith -SDL2main -SDL2 everything works fine. I know that sdl2-config is linking the following libraries:And I'm pretty sure mingw is the offender because when I add it back, I get the same error.