GCC 外部库
GCC extern libraries
信息:
OS: Windows 10
编译器:MinGW gcc
语言:C
SDL 和 OpenGL 已经安装
当我尝试编译测试文件时,收到此错误:
gcc test.c -o test
teste.c:1:10: fatal error: SDL2: No such file or directory
1 | #include <SDL2>
| ^~~~~~
compilation terminated.
测试文件内容为:
#include <SDL2>
#include <stdio.h>
void main()
{
printf("Testing");
}
这是我的问题,请帮助我。
为了使用 SDL header,您需要使用 #include <SDL2/SDL.h>
而不是 #include <SDL2>
。
信息:
OS: Windows 10
编译器:MinGW gcc
语言:C
SDL 和 OpenGL 已经安装
当我尝试编译测试文件时,收到此错误:
gcc test.c -o test
teste.c:1:10: fatal error: SDL2: No such file or directory
1 | #include <SDL2>
| ^~~~~~
compilation terminated.
测试文件内容为:
#include <SDL2>
#include <stdio.h>
void main()
{
printf("Testing");
}
这是我的问题,请帮助我。
为了使用 SDL header,您需要使用 #include <SDL2/SDL.h>
而不是 #include <SDL2>
。