ubuntu16.04 编译出错:fatal error: SDL/SDL.h: No such file or directory
在ubuntu 16.04编译神经网络代码时候,遇到了这样一种错误?
fatal error: SDL/SDL.h: No such file or directory
原因是SDL库没有安装,根据你使用的是SDL1还是SDL2来进行不同的安装:如下所示:
SDL2
sudo apt-get install libsdl2-dev
SDL1
sudo apt-get install libsdl1.2-dev
SDL库是什么?这个估计很多人都没有听过吧,包括我。就顺便学习一下吧。看一下wiki:
SDL(Simple DirectMedia Layer)是一套開放原始碼的跨平台多媒體開發函式庫,使用C語言寫成。SDL提供了數種控制圖像、聲音、輸出入的函式,讓開發者只要用相同或
是相似的程式碼就可以開發出跨多個平台(Linux、Windows、Mac OS X等)的應用軟體。目前SDL多用於開發游戏、模拟器、媒體播放器等多媒體應用领域。
SDL(第一版)使用GNU宽通用公共许可证為授權方式,意指動態連結(dynamic link)其函式庫並不需要開放本身的原始碼。因此諸如《雷神之鎚4》等商業遊戲也使用SDL來開發。
而第二版的SDL則改用Zlib授权來授權。
使用例子:
// Headers
#include "SDL.h" // Main function
int main(int argc, char* argv[])
{
// Initialize SDL
if(SDL_Init(SDL_INIT_EVERYTHING) == -)
return(); // Delay 2 seconds
SDL_Delay(); // Quit SDL
SDL_Quit(); // Return
return ;
}
上面的代码编译运行,就知道系统SDL是否安装成功了。
参考文档:
1 https://zh.wikipedia.org/wiki/SDL
ubuntu16.04 编译出错:fatal error: SDL/SDL.h: No such file or directory的更多相关文章
- 全志TinaLinux编译错误fatal error: unicode/ucnv.h: No such file or directory
今天开始正式干活了 拿到一个全志Tina的板子还有一个SDK压缩包,要求我这周(只剩一天半...)就要把sdk编译通过并且把板子跑起来. 还特别跟我说他们试了下这个sdk编译没法通过,会报错... 竟 ...
- 解决Ubuntu16.04 fatal error: json/json.h: No such file or directory
参考博客 错误产生 安装json-c库之后,根据GitHub上面的readme文件链接到json-c库时出现以下错误: SDMBNJson.h:9:23: fatal error: json/json ...
- 【Redis】编译错误zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory
[Redis]编译错误zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory 在安装redis进行编译 ...
- 编译内核时出现drivers/mfd/mxc-hdmi-core.c:36:24: fatal error: mach/clock.h: No such file or directory
在学习恩智浦IMX6D开发板时,编译内核出现 drivers/mfd/mxc-hdmi-core.c::: fatal error: mach/clock.h: No such file or dir ...
- cocos2d-x 移植到android中编译的一些问题:fatal error: Box2D/Box2D.h: No such file or directory"
1.fatal error: Box2D/Box2D.h: No such file or directory" 须要加入box2d库的支持,改动android.mk文件,例如以下: 查看文 ...
- fatal error: sys/videoio.h: No such file or directory
Determining if the include file sys/videoio.h exists failed with the following output:Change Dir: /h ...
- lua.c:82:10: fatal error: readline/readline.h: No such file or directory #include <readline/readline.h>
make linuxcd src && make linuxmake[1]: Entering directory `/root/lua/lua-5.3.2/src'make all ...
- fatal error: openssl/sha.h: No such file or directory 解决方案
出现这个或者fatal error: openssl/名单.h: No such file or directory.都是没有安装libssl-dev- libssl-dev包含libraries, ...
- lua.c:80:31: fatal error: readline/readline.h: No such file or directory
make linuxcd src && make linuxmake[1]: Entering directory `/root/lua/lua-5.3.2/src'make all ...
- msgsrvmgr.cpp:5:37: fatal error: kdl_conversions/kdl_msg.h: No such file or directory #include <kdl_conversions/kdl_msg.h>
/home/xxx/ros_workspace/src/bp_protocol_bridge/protospot/src/msgsrvmgr.cpp::: fatal error: kdl_conve ...
随机推荐
- php 获取数组深度的值
匿名函数(闭包) $val = array(); array_walk_recursive($array, function ($x) use (&$val) { $val[] = $x; } ...
- FP数据库配置文件
- python定义类()中写object和不写的区别
这里需要说明一下: python3中,类定义默认继承object,所以写不写没有区别 但在python2中,并不是这样 所以此内容是针对python2的,当然python3默认继承,不代表我们就傻乎乎 ...
- List Set Map的区别
1.读取频繁选用List 快速访问选取ArrayList,经常进行添加删除工作可以选用LinkList 2.如果你想进行有序的插入那么还是选型List,因为List是一个有序的容器 3.如果你想保证插 ...
- Apache无法正常启动(配置多个监听端口)
Apache监测多个端口配置: 1.conf->extra->httpd-vhosts.conf 检查配置项是否写错 2.http.conf listen端口是否监听正确 3.环境变量中 ...
- kubernetes 基础
官网 kubernetes.io 有中文 中文网站 http://docs.kubernetes.org.cn kubectl 详细情况 https://kubernetes.io/docs/ref ...
- [leetcode]51. N-QueensN皇后
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens ...
- Tomcat9报错 The valid characters are defined in RFC 7230 and RFC 3986
tomcat8项目移到tomcat9,出现如下问题 HTTP Status 400 – Bad Request Type Exception Report Message Invalid charac ...
- margin和padding的用法与区别--以及bug处理方式
margin和padding的用法: (1)padding (margin) -left:10px; 左内 (外) 边距(2)padding (margin) -right:10px; 右内 (外 ...
- 牛客练习赛31 D 神器大师泰兹瑞与威穆 STL,模拟 A
牛客练习赛31 D 神器大师泰兹瑞与威穆 https://ac.nowcoder.com/acm/contest/218/D 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 26214 ...