但是我现在想把该界面移植到ARM板里面,我用tmake 生成Makefile 文件,然后编译,确总是报错,说找不到libqwt库,错误提示如下所示:
/usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/../../../../arm-linux/bin/ld: skipping incompatible /usr/local/qwt-5.2.0/lib//libqwt.so when searching for -lqwt
/usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/../../../../arm-linux/bin/ld: cannot find -lqwt
collect2: ld returned 1 exit status
make: *** [mydata_plot] 错误:
已经整了三天了,还是完全不知道怎么解决这个问题,麻烦哪位大虾帮帮忙啊!!!!
怀疑是不是Makefiel的问题,我把该文件贴出来:
#############################################################################
# Makefile for building mydata_plot
# Generated by tmake at 16:40, 2011/04/17
# Project: data_plot
# Template: app
#############################################################################
####### Compiler, tools and options
CC = arm-linux-gcc
CXX = arm-linux-g++
CFLAGS = -pipe -Wall -W -O2 -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT
CXXFLAGS= -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT
INCPATH = -I/usr/local/qwt-5.2.0/include -I$(QTDIR)/include -I$(QPEDIR)/include -I/usr/lib/qt-3.3/include
LINK = arm-linux-g++
LFLAGS =
LIBS = $(SUBLIBS) -L/usr/local/arm/3.3.2/lib -L$(QTDIR)/lib -lm -L/usr/local/qwt-5.2.0/lib/ -lqwt -lqte-mt -lpthread
MOC = $(QTDIR)/bin/moc
UIC = $(QTDIR)/bin/uic
TAR = tar -cf
GZIP = gzip -9f
####### Files
HEADERS = data_plot.h \
thread.h \
mainwindow.h
SOURCES = data_plot.cpp \
main.cpp \
thread.cpp \
mainwindow.cpp
OBJECTS = data_plot.o \
main.o \
thread.o \
mainwindow.o
INTERFACES =
UICDECLS =
UICIMPLS =
SRCMOC = moc_data_plot.cpp \
moc_mainwindow.cpp
OBJMOC = moc_data_plot.o \
moc_mainwindow.o
DIST =
TARGET = mydata_plot
INTERFACE_DECL_PATH = .
####### Implicit rules
.SUFFIXES: .cpp .cxx .cc .C .c
.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
.C.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
####### Build rules
all: $(TARGET)
$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)
moc: $(SRCMOC)
tmake: Makefile
Makefile: data_plot.pro
tmake data_plot.pro -o Makefile
dist:
$(TAR) data_plot.tar data_plot.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST)
$(GZIP) data_plot.tar
clean:
-rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET)
-rm -f *~ core
####### Sub-libraries
###### Combined headers
####### Compile
data_plot.o: data_plot.cpp \
data_plot.h
main.o: main.cpp \
mainwindow.h \
thread.h \
data_plot.h
thread.o: thread.cpp \
thread.h
mainwindow.o: mainwindow.cpp \
mainwindow.h \
thread.h \
data_plot.h
moc_data_plot.o: moc_data_plot.cpp \
data_plot.h
moc_mainwindow.o: moc_mainwindow.cpp \
mainwindow.h \
thread.h \
data_plot.h
moc_data_plot.cpp: data_plot.h
$(MOC) data_plot.h -o moc_data_plot.cpp
moc_mainwindow.cpp: mainwindow.h
$(MOC) mainwindow.h -o moc_mainwindow.cpp
我设置环境变量的脚本文件:
#!/bin/bash
export QTDIR=/home/build_qte/qt-2.3.7
export QPEDIR=/home/build_qte/qtopia-free-1.7.0
export LD_LIBRARY_PATH=$QTDIR/lib:$QPEDIR/lib:/usr/local/qwt-5.2.0/lib: $LD_LIBRARY_PATH
export TMAKEDIR=/home/build_qte/tmake-1.11
export TMAKEPATH=$TMAKEDIR/lib/qws/linux-arm-g++
export PATH=$QTDIR/bin:$TMAKEDIR/bin:/usr/local/arm/3.3.2/bin:$QPEDIR/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/qwt-5.2.0/lib:$LD_LIBRARY_PATH