0

我正在尝试为熊猫板(OMAP4、4430)编译 Qt 嵌入式。我为 armv7 安装了这个交叉编译器:

sudo apt-get install g++-4.6-arm-linux-gnueabihf

我下载了最后一个 qt-embedded 源并将它们解压缩到文件夹中:

/opt/qt-everywhere-opensource-src-4.6.4

我复制了配置文件:

cp -r mkspecs/qws/linux-arm-gnueabi-g++ mkspecs/qws/linux-arm-gnueabihf-g++

我修改了 mkspecs/qws/linux-arm-gnueabihf-g++/qmake.conf 如下:

include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)

#Compiler Flags to take advantage of the ARM architecture
#N.B.:I also tried to uncomment the two following instructions with no success   
QMAKE_CFLAGS = -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
QMAKE_CXXFLAGS = -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp

# modifications to g++.conf
QMAKE_CC                = arm-linux-gnueabihf-gcc-4.6
QMAKE_CXX               = arm-linux-gnueabihf-g++-4.6
QMAKE_LINK              = arm-linux-gnueabihf-g++-4.6
QMAKE_LINK_SHLIB        = arm-linux-gnueabihf-g++-4.6

# modifications to linux.conf
QMAKE_AR                = arm-linux-gnueabihf-ar cqs
QMAKE_OBJCOPY           = arm-linux-gnueabihf-objcopy
QMAKE_STRIP             = arm-linux-gnueabihf-strip

load(qt_config)

我运行了配置:

./configure -embedded arm -little-endian -no-qt3support -nomake examples -nomake demos -opensource -confirm-license -xplatform qws/linux-arm-gnueabihf-g++

但是,使用 make 命令编译当然会失败:

make[1]: Entering directory `/opt/qt-everywhere-opensource-src-4.6.4/src/corelib'
/opt/qt-everywhere-opensource-src-4.6.4/bin/moc -DQT_SHARED -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/qws/linux-arm-gnueabihf-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-shared-emb-arm -Iglobal -I../3rdparty/zlib -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I.moc/release-shared-emb-arm animation/qabstractanimation.h -o .moc/release-shared-emb-arm/moc_qabstractanimation.cpp
moc: Cannot create .moc/release-shared-emb-arm/moc_qabstractanimation.cpp
make[1]: *** [.moc/release-shared-emb-arm/moc_qabstractanimation.cpp] Error 1
make[1]: Leaving directory `/opt/qt-everywhere-opensource-src-4.6.4/src/corelib'
make: *** [sub-corelib-make_default-ordered] Error 2

怎么了?

4

2 回答 2

0

对不起,我找到了答案,我已经忘记发布它。该问题与不正确的 moc 安装有关。我已经拥有所有“root”权限。感谢大家的支持

于 2013-03-19T08:33:12.920 回答
0

做它作为“根”。好像您没有创建文件的权限。

于 2013-03-18T17:04:21.183 回答