编译好了ARM平台的Qtopia-2.2.0,按mini2440手册搭建的,
我的qt程序需要多线程支持,本来想按帖子
http://www.aiothome.net/read.php?tid-2298-page-e-fpage-1.html#a的方法得到libqte-mt.so库的,结果行不通,错误都在里面了。
后来看到
http://www.aiothome.net/read.php?tid-4027-fpage-0-toread--page-3.html eddylau的方法,就试了一下,结果最后编译qt程序只得到库文件而没有可执行文件:
gcc是友善自带的4.3.2主机是虚拟机fedora9
下面是我编译的具体步骤:
1.复制代码- #source /opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/setQpeEnv
|
2.
生成pro然后再手动加上CONFIG+= qtopiaapp thread这一句得到的pro:
复制代码- 1 ######################################################################
- 2 # Automatically generated by qmake (1.06c-Qtopia) Mon Jul 12 10:23:34 2010
- 3 ######################################################################
- 4
- 5 TEMPLATE = app
- 6 INCLUDEPATH += .
- 7 CONFIG+= qtopiaapp thread
- 8
- 9 # Input
- 10 HEADERS += dataRecieve.h \
- 11 ******
- 30 SOURCES += dataRecieve.cpp \
- ****
|
3.
复制代码- # qmake -spec /opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/mkspecs/qws/linux-arm-g++ -o Makefile *.pro
- Project ERROR: Please set a target in /opt/FriendlyARM/mini2440/radar-v72/src
|
4.于是在pro最后面加了
复制代码- INTERFACES =
- TARGET = radar
|
5.
复制代码- qmake -spec /opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/mkspecs/qws/linux-arm-g++ -o Makefile *.pro
|
生成的Makefile,也放附件里了
6.
复制代码- # make
- 文字太多,放附件里了:
- 得到的
- [code]# readelf -h libradar.so
- ELF Header:
- Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
- Class: ELF32
- Data: 2's complement, little endian
- Version: 1 (current)
- OS/ABI: UNIX - System V
- ABI Version: 0
- Type: DYN (Shared object file)
- Machine: ARM
- Version: 0x1
- Entry point address: 0x133c4
- Start of program headers: 52 (bytes into file)
- Start of section headers: 273272 (bytes into file)
- Flags: 0x5000002, has entry point, Version5 EABI
- Size of this header: 52 (bytes)
- Size of program headers: 32 (bytes)
- Number of program headers: 4
- Size of section headers: 40 (bytes)
- Number of section headers: 27
- Section header string table index: 24
|
如何才能得到可执行文件啊/
