0

我正在尝试为 ARM cortex-8 板构建 QT。

我按照给定的说明成功安装了主机配置:http: //qt-project.org/wiki/Building_Qt_for_Embedded_Linux

在 ARM 板目标构建配置时,我创建了自己的 mkspec 文件 linux-TIarmv7-g++,其配置如下:

> #
> # qmake configuration for building with arm-linux-g++
> #
> 
> include(../../common/gcc-base-unix.conf)
> include(../../common/g++-unix.conf) include(../../common/linux.conf)
> include(../../common/qws.conf)
> 
> # modifications to g++.conf
> #Toolchain
> 
> 
> #Compiler Flags to take advantage of the ARM architecture QMAKE_CFLAGS_RELEASE    = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon
> -mfloat-abi=softfp QMAKE_CXXFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp QMAKE_CC                = arm-none-linux-gnueabi-gcc QMAKE_CXX               = arm-none-linux-gnueabi-g++ QMAKE_LINK              =
> arm-none-linux-gnueabi-g++ QMAKE_LINK_SHLIB        =
> arm-none-linux-gnueabi-g++
> 
> # modifications to linux.conf QMAKE_AR = arm-none-linux-gnueabi-ar cqs QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy QMAKE_STRIP =
> arm-none-linux-gnueabi-strip
> 
> QMAKE_INCDIR += $$TSLIB_INCDIR QMAKE_LIBDIR += $$TSLIB_LIBDIR
> QMAKE_LIBS   += -lts
> 
> load(qt_config)

我已经安装了codesourcery工具链,我的环境是Ubuntu 12.04 64位操作系统,目标板是ARM-cortex8

我的配置如下:

./configure -prefix /usr/local/qt-embedded -embedded arm -platform qws/linux-x86_64-g++ -xplatform qws/linux-TIarmv7-g++ -depths 16,24,32 -no-mmx -no-3dnow - no-sse -no-sse2 -no-glib -no-cups -no-largefile -no-accessibility -no-openssl -no-gtkstyle -qt-mouse-pc -qt-mouse-linuxtp -qt-mouse-linuxinput -插件-鼠标-linuxtp -插件-鼠标-pc -fast -confirm-license -v

在执行和详细之后,我得到以下错误:与 freetype 库相关

> m-none-linux-gnueabi/bin/ld: cannot find -lts collect2: ld returned 1
> exit status make: *** [sound] Error 1 sound disabled. FreeType
> auto-detection... () arm-none-linux-gnueabi-g++ -c -pipe -O3
> -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -Wall -W  -I../../../mkspecs/qws/linux-TIarmv7-g++ -I. -o freetype.o freetype.cpp freetype.cpp:42:22: fatal error: ft2build.h: No such file
> or directory compilation terminated. make: *** [freetype.o] Error 1
> FreeType disabled. Determining machine byte-order...
> (/home/rootx/qt-everywhere-opensource-src-4.8.1/mkspecs/qws/linux-TIarmv7-g++
> yes /home/rootx/qt-everywhere-opensource-src-4.8.1
> /home/rootx/qt-everywhere-opensource-src-4.8.1)
> arm-none-linux-gnueabi-g++ -Wl,-O1 -o endiantest endiantest.o     -lts
> /home/rootx/toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.1/../../../../arm-none-linux-gnueabi/bin/ld:
> cannot find -lts collect2: ld returned 1 exit status make: ***
> [endiantest] Error 1 Unknown byte order!
> 
> The target system byte order could not be detected!

如何解决这个错误?

4

1 回答 1

0

似乎没有安装 freetype 开发库。

sudo apt-get install libfreetype6-dev 能解决你的问题吗?

于 2012-05-30T14:19:16.047 回答