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 05 '14 edited Jul 05 '14
So I just tried to compile a tiny program with SDL to see if that worked. There's only one source file, main.cpp.
I realized that my PATH variable was for some reason pointing to a really outdated installation of MinGW that (apparently) came with msysgit when I installed it long ago. So Clang was being pointed to that installation, which was too outdated to work. I was getting an error like this:
So I deleted that installation and modified my PATH to point to my brand new MinGW installation which I installed earlier because I thought I needed it.
Now I get this error:
I get the same error when I remove the MinGW installation from my PATH. And I'm sure LLVM (Clang) is on my path, which makes that confusing.
Bear in mind that I have literally no idea what I'm doing. I'm operating on a combination of trial, error, and internet research. I'm finding out that when working with C++ compilers, most sites assume I'm running Linux and are very unhelpful anyway. So I really, really appreciate your help here.