• 10035阅读
  • 10回复

cannot file -lqte probom ? [复制链接]

上一主题 下一主题
离线fanronghua
 
只看楼主 倒序阅读 楼主  发表于: 2009-07-17
this is my qte config ? anyone help me?

root@aw:~# cd /home/charles/1/test/
root@aw:/home/charles/1/test# make
arm-linux-g++ -Wl,-rpath,/usr/local/arm/qte/lib -o test main.o form1.o moc_form1.o   -L/usr/local/arm/qte/lib -lqte
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/bin/ld: skipping incompatible /usr/local/arm/qte/lib/libqte.so when searching for -lqte
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/bin/ld: cannot find -lqte
collect2: ld returned 1 exit status
make: *** [test] Error 1
root@aw:/home/charles/1/test# echo $PATH
/usr/local/arm/qte/lib:/usr/local/arm/qte/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/wang/mipseltools-gcc4-lnx26/bin:/home/arm/mipseltools-gcc4-lnx26/bin
root@aw:/home/charles/1/test# cd /usr/local/arm/qte/lib
root@aw:/usr/local/arm/qte/lib# ls
fonts                    libqnp.prl        libqte-mt.so.3.3.8  libqui.so
libdesignercore.a        libqte.la         libqte.prl          libqui.so.1
libdesignercore.prl      libqte-mt.la      libqte.so           libqui.so.1.0
libeditor.a              libqte-mt.prl     libqte.so.3         libqui.so.1.0.0
libeditor.prl            libqte-mt.so      libqte.so.3.3       qte-mt.pc
libqassistantclient.a    libqte-mt.so.3    libqte.so.3.3.8     qte.pc
libqassistantclient.prl  libqte-mt.so.3.3  libqui.prl          README
root@aw:/usr/local/arm/qte/lib# which arm-linux-g++
/bin/arm-linux-g++
root@aw:/usr/local/arm/qte/lib# arm-linux-g++ -v
Reading specs from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/specs
Configured with: /work/crosstool-0.27/build/arm-linux/gcc-3.4.1-glibc-2.3.2/gcc-3.4.1/configure --target=arm-linux --host=i686-host_pc-linux-gnu --prefix=/usr/local/arm/3.4.1 --with-headers=/usr/local/arm/3.4.1/arm-linux/include --with-local-prefix=/usr/local/arm/3.4.1/arm-linux --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-c99 --enable-long-long
Thread model: posix
gcc version 3.4.1
root@aw:/usr/local/arm/qte/lib# echo $QTDIR
/usr/local/arm/qte
root@aw:/usr/local/arm/qte/lib#

离线guoyun_he

只看该作者 1楼 发表于: 2009-07-17
setenv  LD_LIBRARY_PATH=$QTDIR/lib:$LIBRARY
离线fanronghua
只看该作者 2楼 发表于: 2009-07-17
sorry , i cann't write chinese.

this command i set it alrady.

root@aw:/usr/local/arm/qte/examples/test2# make
arm-linux-g++ -Wl,-rpath,/usr/local/arm/qte/lib -o test2 .obj/release-shared-mt-emb-x86/hello.o .obj/release-shared-mt-emb-x86/main.o .obj/release-shared-mt-emb-x86/moc_hello.o   -L/usr/local/arm/qte/lib -lqte-mt -ldl -lpthread
/usr/local/arm/2.95.3/arm-linux/bin/ld: .obj/release-shared-mt-emb-x86/moc_hello.o: Relocations in generic ELF (EM: 3)
.obj/release-shared-mt-emb-x86/moc_hello.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
离线guoyun_he

只看该作者 3楼 发表于: 2009-07-17
Are you chinese?
why don't you complie a demo first. for example:$QTDIR/examples/hello,
before you run make, change the Makefile to :
离线fanronghua
只看该作者 4楼 发表于: 2009-07-17
Thanks for replay this message.
but i do that like you. i get this error message? can you help me? thanks!

root@aw:/usr/local/arm/qte/examples/hello# ls
hello  hello.cpp  hello.doc  hello.h  hello.pro  main.cpp  README
root@aw:/usr/local/arm/qte/examples/hello# qmake   -spec  $QTDIR/mkspecs/qws/linux-arm-g++   -o  Makefile
root@aw:/usr/local/arm/qte/examples/hello# make
make: Nothing to be done for `first'.
root@aw:/usr/local/arm/qte/examples/hello# rm hello
root@aw:/usr/local/arm/qte/examples/hello# make
arm-linux-g++ -Wl,-rpath,/usr/local/arm/qte/lib -o hello .obj/release-shared-mt-emb-x86/hello.o .obj/release-shared-mt-emb-x86/main.o .obj/release-shared-mt-emb-x86/moc_hello.o   -L/usr/local/arm/qte/lib -lqte-mt -ldl -lpthread
/usr/local/arm/2.95.3/arm-linux/bin/ld: .obj/release-shared-mt-emb-x86/hello.o: Relocations in generic ELF (EM: 3)
.obj/release-shared-mt-emb-x86/hello.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [hello] Error 1
root@aw:/usr/local/arm/qte/examples/hello#

charles
离线guoyun_he

只看该作者 5楼 发表于: 2009-07-20
show me you Makefile!
离线fanronghua
只看该作者 6楼 发表于: 2009-07-20
Thanks your helping!
this is my Makefile .

#############################################################################
# Makefile for building: test
# Generated by qmake (1.07a) (Qt 3.3.8) on: Mon Jul 20 11:08:39 2009
# Project:  test.pro
# Template: app
# Command: $(QMAKE) -spec /usr/local/arm/qte/mkspecs/qws/linux-arm-g++ -o Makefile test.pro
#############################################################################

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

CC       = arm-linux-gcc
CXX      = arm-linux-g++
LEX      = flex
YACC     = yacc
CFLAGS   = -pipe -Wall -W -O2  -DQT_NO_DEBUG -DQT_SHARED
CXXFLAGS = -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2  -DQT_NO_DEBUG -DQT_SHARED
LEXFLAGS =
YACCFLAGS= -d
INCPATH  = -I/usr/local/arm/qte/mkspecs/qws/linux-arm-g++ -I. -I$(QTDIR)/include -I.ui/ -I. -I.moc/
LINK     = arm-linux-g++
LFLAGS   =  -Wl,-rpath,$(QTDIR)/lib
LIBS     = $(SUBLIBS) -L$(QTDIR)/lib -lqte
AR       = ar cqs
RANLIB   =
MOC      = $(QTDIR)/bin/moc
UIC      = $(QTDIR)/bin/uic
QMAKE    = qmake
TAR      = tar -cf
GZIP     = gzip -9f
COPY     = cp -f
COPY_FILE= $(COPY)
COPY_DIR = $(COPY) -R
INSTALL_FILE= $(COPY_FILE)
INSTALL_DIR = $(COPY_DIR)
DEL_FILE = rm -f
SYMLINK  = ln -sf
DEL_DIR  = rmdir
MOVE     = mv -f
CHK_DIR_EXISTS= test -d
MKDIR    = mkdir -p

####### Output directory

OBJECTS_DIR = .obj/

####### Files

HEADERS =
SOURCES = main.cpp
OBJECTS = .obj/main.o \
        .obj/form1.o
FORMS = form1.ui
UICDECLS = .ui/form1.h
UICIMPLS = .ui/form1.cpp
SRCMOC   = .moc/moc_form1.cpp
OBJMOC = .obj/moc_form1.o
DIST       = test.pro
QMAKE_TARGET = test
DESTDIR  =
TARGET   = test

first: all
####### Implicit rules

.SUFFIXES: .c .o .cpp .cc .cxx .C

.cpp.o:
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cc.o:
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cxx.o:
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.C.o:
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.c.o:
    $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<

####### Build rules

all: Makefile $(TARGET)

$(TARGET):  $(UICDECLS) $(OBJECTS) $(OBJMOC)  
    $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(OBJCOMP) $(LIBS)

mocables: $(SRCMOC)
uicables: $(UICDECLS) $(UICIMPLS)

$(MOC):
    ( cd $(QTDIR)/src/moc && $(MAKE) )

Makefile: test.pro  /usr/local/arm/qte/mkspecs/qws/linux-arm-g++/qmake.conf /usr/local/arm/qte/lib/libqte.prl
    $(QMAKE) -spec /usr/local/arm/qte/mkspecs/qws/linux-arm-g++ -o Makefile test.pro
qmake:
    @$(QMAKE) -spec /usr/local/arm/qte/mkspecs/qws/linux-arm-g++ -o Makefile test.pro

dist:
    @mkdir -p .obj/test && $(COPY_FILE) --parents $(SOURCES) $(HEADERS) $(FORMS) $(DIST) .obj/test/ && ( cd `dirname .obj/test` && $(TAR) test.tar test && $(GZIP) test.tar ) && $(MOVE) `dirname .obj/test`/test.tar.gz . && $(DEL_FILE) -r .obj/test

mocclean:
    -$(DEL_FILE) $(OBJMOC)
    -$(DEL_FILE) $(SRCMOC)

uiclean:
    -$(DEL_FILE) $(UICIMPLS) $(UICDECLS)

yaccclean:
lexclean:
clean: mocclean uiclean
    -$(DEL_FILE) $(OBJECTS)
    -$(DEL_FILE) *~ core *.core


####### Sub-libraries

distclean: clean
    -$(DEL_FILE) $(TARGET) $(TARGET)


FORCE:

####### Compile

.obj/main.o: main.cpp .ui/form1.h
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/main.o main.cpp

.ui/form1.h: form1.ui
    $(UIC) form1.ui -o .ui/form1.h

.ui/form1.cpp: .ui/form1.h form1.ui
    $(UIC) form1.ui -i form1.h -o .ui/form1.cpp

.obj/form1.o: .ui/form1.cpp .ui/form1.h
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/form1.o .ui/form1.cpp

.obj/moc_form1.o: .moc/moc_form1.cpp  .ui/form1.h
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_form1.o .moc/moc_form1.cpp

.moc/moc_form1.cpp: $(MOC) .ui/form1.h
    $(MOC) .ui/form1.h -o .moc/moc_form1.cpp

####### Install

install:  

uninstall:  
离线guoyun_he

只看该作者 7楼 发表于: 2009-07-20
LIBS     = $(SUBLIBS) -L/usr/local/arm/3.4/lib -L$(QTDIR)/lib -lqte -lm -ldl -lqte
离线fanronghua
只看该作者 8楼 发表于: 2009-07-20
Thanks your helping.
but i get this message after i Changes LIBS =..

root@aw:/home/charles/test2# make
arm-linux-g++ -Wl,-rpath,/usr/local/arm/qte/lib -o test .obj/main.o .obj/form1.o .obj/moc_form1.o   -L/usr/local/arm/3.4.1/lib -L/usr/local/arm/qte/lib -lqte -lm -ldl -lqte
/usr/local/arm/qte/lib/libqte.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make: *** [test] Error 1
root@aw:/home/charles/test2#

Thanks
离线guoyun_he

只看该作者 9楼 发表于: 2009-07-20
try command:
make clean
make
离线fanronghua
只看该作者 10楼 发表于: 2009-07-20
错误仍然出现.
快速回复
限100 字节
 
上一个 下一个