Discuz! BBS

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 799|回复: 0

树莓派安装Qt4

[复制链接]

254

主题

363

帖子

2431

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
2431
发表于 2024-2-13 19:27:31 | 显示全部楼层 |阅读模式
Apt-get Qt4 on the Raspberry Pi
Jump to navigationJump to search
apt-get install Qt4 on the Rasperry Pi
Using the Raspbian image

Contents
1        apt-get
2        Problem : no toolchain.
2.1        I added a gcc toolchain
2.2        Qt Creator seems to detect that we are going to deploy on a remote target.
apt-get
Firstly I got the development tools needed by Qt Creator in the hope it would be less heavy for the Pi to download separately.

sudo apt-get install qt4-dev-tools
Then I went for Qt Creator

sudo apt-get install qtcreator
I also installed

ref:https://wiki.qt.io/Apt-get_Qt4_on_the_Raspberry_Pi
sudo apt-get install gcc
sudo apt-get install xterm
sudo apt-get install git-core
sudo apt-get install subversion
this gives as a result Qt Creator 2.5 with Qt 4.8.1 32 bit

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
Tools/Options > build & run > tab tool chains > 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.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|DiscuzX

GMT+8, 2025-4-16 04:15 , Processed in 0.015064 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表