致命错误:libudev.h:没有这样的文件或目录(Raspberry Pi Cross工具) [英] fatal error: libudev.h: No such file or directory (Raspberry Pi Cross tools)

查看:3124
本文介绍了致命错误:libudev.h:没有这样的文件或目录(Raspberry Pi Cross工具)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在ubuntu12.04上使用g ++ / gcc编译它是OK但是我无法使用raspberry pi工具大师交叉编译



toolsmaster

I compile with g++/gcc on ubuntu12.04 and it is "OK" but I cannot cross compile using raspberry pi tools master

toolsmaster

CC := /home/Desktop/Simple_Linux_Driver/tools-master/arm-bcm2708/arm-bcm2708-linux-gnueabi/bin/arm-bcm2708-linux-gnueabi-g++
GCC := /home/Desktop/Simple_Linux_Driver/tools-master/arm-bcm2708/arm-bcm2708-linux-gnueabi/bin/arm-bcm2708-linux-gnueabi-gcc





我安装了以下项目:



-sudo apt-get install libusb-1.0-0-dev

-sudo apt-get install libudev-dev



I had install the following item:

-sudo apt-get install libusb-1.0-0-dev
-sudo apt-get install libudev-dev

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/include/libudev.h
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/include/libusb-1.0/libusb.h





raspberry pi内核版本3.2.27



任何建议还是我错过了什么?



raspberry pi kernel version 3.2.27

Any suggection or i miss out something?

推荐答案

LD_LIBRARY_PATH:/usr/include/libudev.h
expor t LD_LIBRARY_PATH =
LD_LIBRARY_PATH:/usr/include/libudev.h export LD_LIBRARY_PATH=


LD_LIBRARY_PATH:/usr/include/libusb-1.0/libusb.h
LD_LIBRARY_PATH:/usr/include/libusb-1.0/libusb.h





raspberry pi内核版本3.2.27



任何建议还是我错过了什么?



raspberry pi kernel version 3.2.27

Any suggection or i miss out something?


LD_LIBRARY_PATH 由链接器而不是编译器使用,即使这样,您也只应将路径添加到包含所需文件的目录。请参阅 http://stackoverflow.com/questions / 558803 / how-to-add-a-default-include-path-for-gcc-in-linux [ ^ ]用于设置包含文件的路径。
LD_LIBRARY_PATH is used by the linker not the compiler, and even then you should only add the path as far as the directory containing the required files. See http://stackoverflow.com/questions/558803/how-to-add-a-default-include-path-for-gcc-in-linux[^] for setting the path for include files.


这篇关于致命错误:libudev.h:没有这样的文件或目录(Raspberry Pi Cross工具)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆