当前位置: 技术问答>linux和unix
关于QT在mips平台上的移植
来源: 互联网 发布时间:2017-04-13
本文导语: 我成功编译完qt源码后 qmake -project QFileInfo::absolutePath: Constructed with empty filename root@debian:/home/qttest/helloworld# qmake root@debian:/home/qttest/helloworld# make /opt/qt4.5.1/bin/uic widget.ui -o ui_widget.h mipsel-linux-g++ -c -pipe -mips32 -O...
我成功编译完qt源码后
qmake -project
QFileInfo::absolutePath: Constructed with empty filename
root@debian:/home/qttest/helloworld# qmake
root@debian:/home/qttest/helloworld# make
/opt/qt4.5.1/bin/uic widget.ui -o ui_widget.h
mipsel-linux-g++ -c -pipe -mips32 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/qt4.5.1/mkspecs/qws/linux-mips-g++ -I. -I/opt/qt4.5.1/include/QtCore -I/opt/qt4.5.1/include/QtNetwork -I/opt/qt4.5.1/include/QtGui -I/opt/qt4.5.1/include -I. -I. -I. -o main.o main.cpp
mipsel-linux-g++ -c -pipe -mips32 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/qt4.5.1/mkspecs/qws/linux-mips-g++ -I. -I/opt/qt4.5.1/include/QtCore -I/opt/qt4.5.1/include/QtNetwork -I/opt/qt4.5.1/include/QtGui -I/opt/qt4.5.1/include -I. -I. -I. -o widget.o widget.cpp
/opt/qt4.5.1/bin/moc -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/qt4.5.1/mkspecs/qws/linux-mips-g++ -I. -I/opt/qt4.5.1/include/QtCore -I/opt/qt4.5.1/include/QtNetwork -I/opt/qt4.5.1/include/QtGui -I/opt/qt4.5.1/include -I. -I. -I. widget.h -o moc_widget.cpp
mipsel-linux-g++ -c -pipe -mips32 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/qt4.5.1/mkspecs/qws/linux-mips-g++ -I. -I/opt/qt4.5.1/include/QtCore -I/opt/qt4.5.1/include/QtNetwork -I/opt/qt4.5.1/include/QtGui -I/opt/qt4.5.1/include -I. -I. -I. -o moc_widget.o moc_widget.cpp
mipsel-linux-g++ -Wl,-O1 -Wl,-rpath,/opt/qt4.5.1/lib -o helloworld main.o widget.o moc_widget.o -L/opt/qt4.5.1/lib -lQtGui -L/opt/qt4.5.1/lib -lQtNetwork -lQtCore -lpthread
/home/mips-4.3/bin/../lib/gcc/mips-linux-gnu/4.3.2/../../../../mips-linux-gnu/bin/ld: warning: libz.so.1, needed by /opt/qt4.5.1/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `deflateInit_'
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `deflateInit2_'
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `compress'
/opt/qt4.5.1/lib/libQtCore.so: undefined reference to `uncompress'
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `deflate'
/opt/qt4.5.1/lib/libQtCore.so: undefined reference to `compress2'
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `deflateEnd'
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `crc32'
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `inflate'
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `inflateInit2_'
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `inflateInit_'
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `inflateEnd'
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `inflateReset'
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `deflateReset'
collect2: ld returned 1 exit status
这是怎么回事?
qmake -project
QFileInfo::absolutePath: Constructed with empty filename
root@debian:/home/qttest/helloworld# qmake
root@debian:/home/qttest/helloworld# make
/opt/qt4.5.1/bin/uic widget.ui -o ui_widget.h
mipsel-linux-g++ -c -pipe -mips32 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/qt4.5.1/mkspecs/qws/linux-mips-g++ -I. -I/opt/qt4.5.1/include/QtCore -I/opt/qt4.5.1/include/QtNetwork -I/opt/qt4.5.1/include/QtGui -I/opt/qt4.5.1/include -I. -I. -I. -o main.o main.cpp
mipsel-linux-g++ -c -pipe -mips32 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/qt4.5.1/mkspecs/qws/linux-mips-g++ -I. -I/opt/qt4.5.1/include/QtCore -I/opt/qt4.5.1/include/QtNetwork -I/opt/qt4.5.1/include/QtGui -I/opt/qt4.5.1/include -I. -I. -I. -o widget.o widget.cpp
/opt/qt4.5.1/bin/moc -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/qt4.5.1/mkspecs/qws/linux-mips-g++ -I. -I/opt/qt4.5.1/include/QtCore -I/opt/qt4.5.1/include/QtNetwork -I/opt/qt4.5.1/include/QtGui -I/opt/qt4.5.1/include -I. -I. -I. widget.h -o moc_widget.cpp
mipsel-linux-g++ -c -pipe -mips32 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/qt4.5.1/mkspecs/qws/linux-mips-g++ -I. -I/opt/qt4.5.1/include/QtCore -I/opt/qt4.5.1/include/QtNetwork -I/opt/qt4.5.1/include/QtGui -I/opt/qt4.5.1/include -I. -I. -I. -o moc_widget.o moc_widget.cpp
mipsel-linux-g++ -Wl,-O1 -Wl,-rpath,/opt/qt4.5.1/lib -o helloworld main.o widget.o moc_widget.o -L/opt/qt4.5.1/lib -lQtGui -L/opt/qt4.5.1/lib -lQtNetwork -lQtCore -lpthread
/home/mips-4.3/bin/../lib/gcc/mips-linux-gnu/4.3.2/../../../../mips-linux-gnu/bin/ld: warning: libz.so.1, needed by /opt/qt4.5.1/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `deflateInit_'
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `deflateInit2_'
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `compress'
/opt/qt4.5.1/lib/libQtCore.so: undefined reference to `uncompress'
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `deflate'
/opt/qt4.5.1/lib/libQtCore.so: undefined reference to `compress2'
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `deflateEnd'
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `crc32'
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `inflate'
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `inflateInit2_'
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `inflateInit_'
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `inflateEnd'
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `inflateReset'
/opt/qt4.5.1/lib/libQtGui.so: undefined reference to `deflateReset'
collect2: ld returned 1 exit status
这是怎么回事?
|
/home/mips-4.3/bin/../lib/gcc/mips-linux-gnu/4.3.2/../../../../mips-linux-gnu/bin/ld: warning: libz.so.1, needed by /opt/qt4.5.1/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
你首先得交叉编译有zlib库。
你首先得交叉编译有zlib库。