Study SDL with Code::Blocks 17.12

Table of Contents

NEVER trust pre-configured configs

新建一个empty project,在右键单击project名称的 project build options 中找到 search directories 选项卡,在之下的 Compiler 选项卡中 Add 你下载的 SDL2(x86/x86-64)中的 include 文件夹;Linker 选项卡中 Add 那个 lib 文件夹。切换到 Linker Settings 选项卡,在 Other linker options 中填入“-lmingw32 -lSDL2main -lSDL2 (-SDL2_Image) ”

记得包括正确位置的头文件 XD

参考资料:http://lazyfoo.net/tutorials/SDL/index.php

Nemo Xiong avatar
Nemo Xiong
我永远喜欢妃爱
comments powered by Disqus