小编use*_*293的帖子

编译Code :: Blocks中的SDL时,"winapifamily.h:没有这样的文件或目录"

我正在使用LazyFoo的SDL2.0教程,使用Code :: Blocks 13.12.我已经毫无困难地将SDL2链接并在VS2010中运行但是已经更改了IDE并遇到了这个错误:

winapifamily.h:没有这样的文件或目录

我认为一切都是正确的.我已将程序指向我的SDL2 include和lib目录.

Buildlog :(文件中出现错误:..\include\SDL2\SDL_platform.h)

=== Build:在SDL2_Setup中调试(编译器:GNU GCC编译器)===

致命错误:winapifamily.h:没有这样的文件或目录

===构建失败:1个错误,0个警告(0分钟,0秒(秒))===

这是我第一次在这里问一个问题.我在Google上找到答案并在此处搜索现有的问题/答案,但无法解决问题.这是我的代码.

我的代码:

// Using SDL and standard IO
#include <SDL.h>
#include <stdio.h>

// Screen dimension constants
const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;

int main( int argc, char* args[] )
{
    // The window we'll be rendering to
    SDL_Window* window = NULL;

    // The surface contained by the window
    SDL_Surface* screenSurface = NULL;

    // Initialize SDL
    if( SDL_Init( SDL_INIT_VIDEO) < 0 ) …
Run Code Online (Sandbox Code Playgroud)

c++ sdl codeblocks sdl-2

48
推荐指数
3
解决办法
5万
查看次数

标签 统计

c++ ×1

codeblocks ×1

sdl ×1

sdl-2 ×1