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 ...
随机推荐
- DML DDL DCL
转自:https://blog.csdn.net/level_level/article/details/4248685
- MySql中对Group by后的结果数进行Count
今天在写MySQ的SQL语句的时候遇到了一个奇怪的问题 select count(*) from subsitealbum t1, photo t2,files t3 where t1.SourceA ...
- python 网络编程 tcp和udp 协议
1. 网络通信协议 osi七层,tcp\ip五层 tcp\ip五层 arp协议:通过IP地址找到mac地址 2.tcp和udp的区别 tcp协议:面向连接,消息可靠,相对udp来讲,传输速度慢,消息是 ...
- 394. Decode String 解码icc字符串3[i2[c]]
[抄题]: Given an encoded string, return it's decoded string. The encoding rule is: k[encoded_string], ...
- [leetcode]40. Combination Sum II组合之和之二
Given a collection of candidate numbers (candidates) and a target number (target), find all unique c ...
- Head First Servlets & JSP 学习笔记 第六章 —— 会话状态
MVC中的M(模型),通常就是一个普通的类,这个类里面的信息就是业务逻辑. 会话(Session) 我们可以使用一个HttpSession对象,来保存横跨多个请求的会话状态. HTTP协议使用的是无状 ...
- 微信小程序之---- 数据处理
exports 关键字 .wxs 通过该属性,可以对外共享本模块的私有变量与函数 使用步骤 1. 在 .wxs后缀文件 exports定义参数 var foo = "'hell ...
- android studio Error:Execution failed for task ':app:processDebugResources'. > com.android.ide.common.process.ProcessException: Failed to execute aapt
情况很奇怪 我是更新版本; 问题解决: clean project; 可能是编辑器有地方存有配置数据;
- Julia 下载 安装 juno 开发环境搭建
Windows平台 Julia 的官网 (https://julialang.org) 下载链接(https://julialang.org/downloads) 下载完成后,如果想安装在 C 盘,则 ...
- 【机器学习】Octave 实现逻辑回归 Logistic Regression
ex2data1.txt ex2data2.txt 本次算法的背景是,假如你是一个大学的管理者,你需要根据学生之前的成绩(两门科目)来预测该学生是否能进入该大学. 根据题意,我们不难分辨出这是一种二分 ...