QtFtp and Qt5.3.1 on imx6 undefined reference
-
Hi,
I'm trying to port a large embedded application from Windows and Qt4 to Linux and Qt5.3.1 on imx6.
Initially i thought that qftp compiled successfully, but when i run a 'make clean' and try to recompile it now even the included examples fail with the same undefined references as my application:
@cd src/ && ( test -e Makefile || /opt/qt5-imx6/bin/qmake /home/adminuser/test/qtftp/src/src.pro -o Makefile ) && make -f Makefile
make[1]: Betrete Verzeichnis '/home/adminuser/test/qtftp/src'
cd qftp/ && ( test -e Makefile || /opt/qt5-imx6/bin/qmake /home/adminuser/test/qtftp/src/qftp/qftp.pro -o Makefile ) && make -f Makefile
make[2]: Betrete Verzeichnis '/home/adminuser/test/qtftp/src/qftp'
make[2]: Für das Ziel »first« ist nichts zu tun.
make[2]: Verlasse Verzeichnis '/home/adminuser/test/qtftp/src/qftp'
make[1]: Verlasse Verzeichnis '/home/adminuser/test/qtftp/src'
cd examples/ && ( test -e Makefile || /opt/qt5-imx6/bin/qmake /home/adminuser/test/qtftp/examples/examples.pro -o Makefile ) && make -f Makefile
make[1]: Betrete Verzeichnis '/home/adminuser/test/qtftp/examples'
cd qftp/ && ( test -e Makefile || /opt/qt5-imx6/bin/qmake /home/adminuser/test/qtftp/examples/qftp/qftp.pro -o Makefile ) && make -f Makefile
make[2]: Betrete Verzeichnis '/home/adminuser/test/qtftp/examples/qftp'
/opt/sysroots/x86_64-linux/usr/bin/armv7ahf-vfp-neon-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-g++ -Wl,-rpath-link,/opt/sysroots/imx6/usr/lib --sysroot=/opt/sysroots/imx6 -Wl,-O1 -Wl,-rpath,/opt/qt5-imx6/lib -o qftp .obj/ftpwindow.o .obj/main.o .obj/qrc_ftp.o .obj/moc_ftpwindow.o -L/opt/sysroots/imx6/usr/lib -L/home/adminuser/test/qtftp/lib -lQt5Ftp -L/opt/sysroots/imx6/opt/qt5-imx6/lib -L/opt/qt5-imx6/lib -lQt5Widgets -lQt5Network -lQt5Gui -lQt5Core -lGLESv2 -lEGL -lGAL -lpthread
.obj/ftpwindow.o: In functionFtpWindow::downloadFile()': ftpwindow.cpp:(.text+0x41c): undefined reference to
QFtp::get(QString const&, QIODevice*, QFtp::TransferType)'
.obj/ftpwindow.o: In functionFtpWindow::cancelDownload()': ftpwindow.cpp:(.text+0x670): undefined reference to
QFtp::abort()'
.obj/ftpwindow.o: In functionFtpWindow::connectToFtp()': ftpwindow.cpp:(.text+0x80c): undefined reference to
QFtp::QFtp(QObject*)'
ftpwindow.cpp:(.text+0xa20): undefined reference toQFtp::connectToHost(QString const&, unsigned short)' ftpwindow.cpp:(.text+0xa6c): undefined reference to
QFtp::login(QString const&, QString const&)'
ftpwindow.cpp:(.text+0xd1c): undefined reference toQFtp::connectToHost(QString const&, unsigned short)' ftpwindow.cpp:(.text+0xdc0): undefined reference to
QFtp::login(QString const&, QString const&)'
ftpwindow.cpp:(.text+0xe84): undefined reference toQFtp::cd(QString const&)' ftpwindow.cpp:(.text+0xff8): undefined reference to
QFtp::login(QString const&, QString const&)'
.obj/ftpwindow.o: In functionFtpWindow::cdToParent()': ftpwindow.cpp:(.text+0x13b8): undefined reference to
QFtp::cd(QString const&)'
ftpwindow.cpp:(.text+0x13d0): undefined reference toQFtp::list(QString const&)' ftpwindow.cpp:(.text+0x14b8): undefined reference to
QFtp::cd(QString const&)'
.obj/ftpwindow.o: In functionFtpWindow::processItem(QTreeWidgetItem*, int)': ftpwindow.cpp:(.text+0x16b0): undefined reference to
QFtp::cd(QString const&)'
ftpwindow.cpp:(.text+0x16c8): undefined reference toQFtp::list(QString const&)' .obj/ftpwindow.o: In function
FtpWindow::connectOrDisconnect()':
ftpwindow.cpp:(.text+0x2830): undefined reference toQFtp::abort()' .obj/ftpwindow.o: In function
FtpWindow::ftpCommandFinished(int, bool)':
ftpwindow.cpp:(.text+0x2e18): undefined reference toQFtp::currentCommand() const' ftpwindow.cpp:(.text+0x2e28): undefined reference to
QFtp::currentCommand() const'
ftpwindow.cpp:(.text+0x2e38): undefined reference toQFtp::currentCommand() const' ftpwindow.cpp:(.text+0x2e48): undefined reference to
QFtp::currentCommand() const'
ftpwindow.cpp:(.text+0x334c): undefined reference to `QFtp::list(QString const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [qftp] Fehler 1
make[2]: Verlasse Verzeichnis '/home/adminuser/test/qtftp/examples/qftp'
make[1]: *** [sub-qftp-make_first] Fehler 2
make[1]: Verlasse Verzeichnis '/home/adminuser/test/qtftp/examples'
make: *** [sub-examples-make_first] Fehler 2@maybe there is something in the wrong place or something is not configured correctly?
I tried the syncqt.pl with version 5.3.1 (Qt version) as well as 5.0.0, which seems to be the qftp version. Do I need to specify something else in this step?
Any help is appreciated!
Thanks in advance,
hhazard -
make clean is usually not enough when compiling Qt modules. Try a fresh code checkout (delete the directory, extract again/ git clone again).
-
okay, the following did the trick, I think. Thank you very much!
@rm -rf qtftp
git clone git://gitorious.org/qt/qtftp.git
cd qtftp
/opt/qt5-imx6/bin/syncqt.pl -version 5.3.1
qmake
make@my problem was the missing sync and then I forgot to try a fresh checkout as I already tried before (without sync)...
now, there are only some application internal undefined references left in my application ;)
-
Nice. Happy coding :-)