1

尝试构建我的应用程序时出现此错误:

make: Wl,-rpath-link,: Command not found

我的 Makefile 看起来是这样的,它是使用 OE 工具链中的 qmake 程序生成的文件。

    #############################################################################
# Makefile for building: app_qt
# Generated by qmake (2.01a) (Qt 4.8.1) on: Tue Jun 26 17:49:26 2012
# Project:  app_qt.pro
# Template: app
# Command: /usr/local/oecore-i686/sysroots/i686-oesdk-linux/usr/bin/qmake -o Makefile ap_qt.pro
#############################################################################

####### Compiler, tools and options

CC            = $(OE_QMAKE_CC)
CXX           = $(OE_QMAKE_CXX)
DEFINES       = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB
CFLAGS        = -pipe -pipe $(OE_QMAKE_CFLAGS) -fpermissive -O2 -Wall -W -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS      = -pipe -pipe -pipe $(OE_QMAKE_CFLAGS) $(OE_QMAKE_CXXFLAGS) -O2 -O2 -Wall -W -Wall -W -Wall -W -D_REENTRANT $(DEFINES)
INCPATH       = -I/usr/local/oecore-i686/sysroots/armv7ahf-vfp-neon-oe-linux-gnueabi/usr/share/qtopia/mkspecs/linux-g++ -I. -I$(OE_QMAKE_INCDIR_QT)/QtCore -I$(OE_QMAKE_INCDIR_QT)/QtGui -I$(OE_QMAKE_INCDIR_QT) -I. -Isrc -Isrc/screens -Isrc/Lists -Isrc/widgets -Isrc/FileIO -Isrc/communication -IQSerialDevice/src -I.
LINK          = $(OE_QMAKE_LINK)
LFLAGS        = $(OE_QMAKE_LDFLAGS) -Wl,-rpath-link,$(OE_QMAKE_LIBDIR_QT)
LIBS          = $(SUBLIBS)  -L$(OE_QMAKE_LIBDIR_QT) -lQtGuiE -lQtCoreE -lpthread 
AR            = $(OE_QMAKE_AR) cqs
RANLIB        = 
QMAKE         = /usr/local/oecore-i686/sysroots/i686-oesdk-linux/usr/bin/qmake
TAR           = tar -cf
COMPRESS      = gzip -9f
COPY          = cp -f
SED           = sed
COPY_FILE     = $(COPY)
COPY_DIR      = $(COPY) -r
STRIP         = $(OE_QMAKE_STRIP)
INSTALL_FILE  = install -m 644 -p
INSTALL_DIR   = $(COPY_DIR)
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE      = rm -f
SYMLINK       = ln -f -s
DEL_DIR       = rmdir
MOVE          = mv -f
CHK_DIR_EXISTS= test -d
MKDIR         = mkdir -p

####### Output directory

OBJECTS_DIR   = ./

有人认识到错误并知道它为什么会出现吗?

提前致谢。:)

4

1 回答 1

1

产生错误是因为变量$(OE_QMAKE_LIBDIR_QT)不存在。所以

-Wl,-rpath-link,$(OE_QMAKE_LIBDIR_QT)

变成

-Wl,-rpath-link,

您是否设置了其他变量,例如$(OE_QMAKE_CC)and $(OE_QMAKE_CXX),如果是,在哪里?您应该将上面的变量添加到此列表中。它应该指向libQt 安装的子目录。

这可能是例如(这里是 Qt 版本 4.8.0)/usr/local/Trolltech/Qt-4.8.0/lib:.

在您的主目录中的本地安装中,它可能如下所示~/qt/Desktop/Qt/4.8.1/gcc/lib

对于 Qtopia,您应该查看/usr/local/oecore-i686/sysroots...

于 2012-06-27T08:51:02.003 回答