一天前我安装了一个 SDL2 库。它还没有在 Debian Wheezy 中,所以我使用了configure, make, make install
命令。
毕竟,当我尝试使用 SDL_Texture 时,我得到了这个错误:
error: forward declaration of ‘SDL_Texture {aka struct SDL_Texture}’
invalid use of incomplete type ‘SDL_Texture {aka struct SDL_Texture}’
查找声明后,我发现的所有内容都是 SDL_render.h 中的这两行:
struct SDL_Texture;
typedef struct SDL_Texture SDL_Texture;
根本没有定义。我认为我的安装缺少文件 SDL_sysrender.h。它在我下载的源代码中,但不在 SDL2 包含路径中。
问题应该出在哪里?有必要对配置文件使用任何标志吗?谢谢你的帮助。