一天前,我安装了一个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包含路径中。
问题应该出在哪里?需要使用任何标志来配置文件吗? 感谢您的帮助。