博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
树莓派中安装QT
阅读量:3948 次
发布时间:2019-05-24

本文共 1543 字,大约阅读时间需要 5 分钟。

分享一下我老师大神的人工智能教程!零基础,通俗易懂!

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

               

树莓派中安装QT

本文博客链接:,作者:jdh,转载请注明.

环境:

主机:WIN7

硬件:树莓派

步骤:

参考链接:http://qt-project.org/wiki/apt-get_Qt4_on_the_Raspberry_Pi

Firstly I got the development tools needed by Qt Creator in the hope it would be less heavy for the Pi to download separately.

  1. sudo apt
    -get install qt4
    -dev
    -tools

Then I went for Qt Creator

  1. sudo apt
    -get install Qtcreator

I also installed

  1. sudo apt
    -get install gcc
  2. sudo apt
    -get install xterm
  3. sudo apt
    -get install git
    -core
  4. sudo apt
    -get install subversion
this gives as a result Qt Creator 2.5 with Qt 4.8.1 32 bit

如果出现问题:e: unable to locate package qt creator,则输入以下命令更新

sudo apt-get update && sudo apt-get upgrade

如果还是有问题,尝试sudo apt-get install qtcreator

成功后可以运行qtcreator:
此时还需要添加编译链:

Problem : no toolchain.

We can only compile for remote embedded devices and this is not the case here, because we are on the Pi and not remotely accessing it.

I added a gcc toolchain

Options > build & run > tab tool chain > button add

Choose GCC

  • Then set compiler path : /usr/bin/arm-linux-gnueabihf-gcc-4.6
  • Debugger : /usr/bin/gdb
  • Mkspec : default

Qt Creator seems to detect that we are going to deploy on a remote target.

To fix this :

  • Go to menu help > about plugins
  • Uncheck device support > remote linux
  • Restart Qt Creator
  • Go to tools > options TAB > build & run > Qt versions > add “/usr/bin/qmake-qt4”

It will then show up as a desktop project in the project wizard instead of embedded.

配置好之后,尝试运行一个简单的程序,效果如下:
运行成功!不过编译很缓慢,正式开发估计还是得在PC上开发好之后再进行移植.
           

给我老师的人工智能教程打call!

这里写图片描述
你可能感兴趣的文章
如何在JNI中抛异常
查看>>
Android应用程序的完全退出
查看>>
Task和Activity相关的一些属性
查看>>
JAVA系统属性之user.home
查看>>
Android代码截屏
查看>>
Android中打印代码的调用层次
查看>>
成功者十三个价值连城的习惯
查看>>
特别成功的人会做6件事
查看>>
Android: 用jni 获取MAC地址
查看>>
字符串列表的C语言实现:c_strlist
查看>>
客户沟通的方式:礼貌待客沟通方式,技巧推广沟通方式,个性服务沟通方式
查看>>
用弹性工作制留住员工
查看>>
知识=经验×反思2
查看>>
领导者如何发现关键问题
查看>>
学习无为领导力
查看>>
卓越领导看过程
查看>>
领导力与各种循环挑战
查看>>
达成谈判协议 - 避免操之过急
查看>>
销售人说话“十大忌”
查看>>
营销中的“战略非对称”
查看>>