交叉编译树莓PI [英] Cross compiling for Raspberry PI

查看:375
本文介绍了交叉编译树莓PI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写的树莓派开发板,使用了OpenCV库来处理一些图像数据的GUI应用程序。最终的结果是与某些按钮的图形应用程序,并且显示图像的区域。

I am writing a GUI application for the Raspberry PI dev board that makes use of the OpenCV library to process some image data. The end result is a graphical application with some buttons, and an area to display images.

我避免IDE的时候我可以,因为它得到乏味不得不学习新的IDE每工具,此外还有一个新的语言,通常在手去与我的工作的项目。我所有的发展,95%是在VIM。

I avoid IDE's when I can, as it gets tedious having to learn a new IDE for every tool, in addition to a new language that usually goes in hand with the projects I work on. 95% of all my development is in VIM.

我如何建立一个基本的生成文件项目,使得使用GCC,OpenCV的,GTK +的,并编译树莓PI(即:ARM11)是在x86系统上运行我的Ubuntu安装运行?的目标是使这一点,可以在任何Linux系统上构建一个便携式项目

How do I set up a basic makefile project that makes use of GCC, OpenCV, GTK+, and compiles for the Raspberry PI (ie: arm11) that runs on my Ubuntu installation running on an x86 system? The goal is to make this a portable project that can be built on any Linux system.

我熟悉通过 apt-get的安装OpenCV的和GTK +库,我也知道我需要在我的的main.c 文件。现在我只需要弄清楚在makefile编译为ARM和反对适当的库链接所需的基本语句。 OpenCV的库我通过获得 apt-get的似乎是x86的,我不知道是否包含了ARM的变种。

I'm familiar with installing the OpenCV and GTK+ libraries via apt-get, and I also know I need to include specific header files in my main.c file. Now I just need to figure out the basic statements needed in the makefile to compile for ARM and link against the appropriate libraries. The OpenCV libraries I get via apt-get seem to be for x86, and I don't know if the ARM variants are included.

感谢您。

推荐答案

可能需要刷上你的谷歌福。

Probably need to brush up on your Google-fu.

下面是获得GTK +建设作为一个交叉编译的Makefile项目的制定出的例子,包括所涉及的工作的90%左右。

Here is a worked-out example of getting GTK+ building as a cross-compiled makefile project, and covers about 90% of the work involved.

http://hertaville.com/2013/07/19/cross-compiling-gtk-applications-for-the-raspberry-pi/

至于OpenCV的,刚使用上面的指令创建GTK +的项目,那么就更新你的LDFLAGS在makefile本身,包括下面这个例子说明OpenCV的相关的头。

As for OpenCV, just create your GTK+ project using the instruction above, then just update your LDFLAGS in the makefile itself, and include the OpenCV-related headers noted in this example below.

http://aplacetogeek.word$p$pss.com/qt-opencv-v4l-cross-compiling-raspberry-pi-beagle-bone/

这篇关于交叉编译树莓PI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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