I wanted to teach myself SDL, but in the first attempt I ran into a rather unpleasant problem. I did some research and found out that I first need CodeBlocks to know where the library is. Firstly, I have a 64 byte OS.
Just as I read, I put things in:
Project → Linker settings (direct links to DLL files, I chose x64, of course) and "-lmingw32 -lSDL2main -lSDL2" in "other linker options". This puzzles me a bit, but replacing 32 with 64 raises another error, so I saved it that way.
Project → Search Directories:
-> Compiler: link to /include folder with header files
-> Linker: link to /lib folder with .dll files
I also made sure that these things are visible after clicking on the project itself and selecting "build options".
Did I forget something?
source
share