Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Mini2440, UBUNTU, ARM-LINUX-GCC: ld: cannot find -lqtopia2
Qt 6.11 is out! See what's new in the release blog

Mini2440, UBUNTU, ARM-LINUX-GCC: ld: cannot find -lqtopia2

Scheduled Pinned Locked Moved Installation and Deployment
5 Posts 3 Posters 6.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hello everybody!
    I'm a new user of UBUNTU, FORUM, and Mini2440 Platform.

    I known all 2 mounth ago and I must develop with this.

    I have a problem: I can't start beacause I never compile example project
    "Hello".

    I have done a virtual machine with Virtual Box on Windows7 64bit and I have
    install and upgrade UBUNTU 11.10.

    With terminal I try to compile the "Hello" example from CD and I read so:

    ubuntu@ubuntu-VirtualBox:~$ cd
    /home/ubuntu/opt/FriendlyARM/mini2440/arm-qtopia/hello
    ubuntu@ubuntu-VirtualBox:~/opt/FriendlyARM/mini2440/arm-qtopia/hello$ ls
    build description-pak hello.cpp hello.h hello.pro.user Makefile
    copia hello_base.ui hello.desktop hello.pro main.cpp
    ubuntu@ubuntu-VirtualBox:~/opt/FriendlyARM/mini2440/arm-qtopia/hello$
    ./build
    rm -f .obj/release-shared/moc_hello_base.o
    rm -f .moc/release-shared/moc_hello_base.cpp
    rm -f .ui/release-shared/hello_base.cpp .ui/release-shared/hello_base.h
    rm -f .obj/release-shared/hello.o .obj/release-shared/main.o
    .obj/release-shared/hello_base.o
    rm -f *~ core *.core
    /home/ubuntu/opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qt2/bi
    n/uic
    hello_base.ui -o .ui/release-shared/hello_base.h
    /home/ubuntu/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-g++ -c -pipe
    -DQWS -fno-exceptions -fno-rtti -Wall -W -Os -DQT_NO_QWS_VFB
    -DQTOPIA_DATA_LINKING -DQCONFIG="qconfig-qpe.h" -DQTOPIA_TARGET="hello"
    -DQTOPIA_TRTARGET="hello" -DQT_NO_DEBUG
    -I/home/ubuntu/opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qtop
    ia/mkspecs/qws/linux-arm-g++
    -I. -I../qtopia-2.2.0-FriendlyARM/qtopia/include
    -I../qtopia-2.2.0-FriendlyARM/qt2/include -I.ui/release-shared/
    -I.moc/release-shared/ -o .obj/release-shared/hello.o hello.cpp
    /home/ubuntu/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-g++ -c -pipe
    -DQWS -fno-exceptions -fno-rtti -Wall -W -Os -DQT_NO_QWS_VFB
    -DQTOPIA_DATA_LINKING -DQCONFIG="qconfig-qpe.h" -DQTOPIA_TARGET="hello"
    -DQTOPIA_TRTARGET="hello" -DQT_NO_DEBUG
    -I/home/ubuntu/opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qtop
    ia/mkspecs/qws/linux-arm-g++
    -I. -I../qtopia-2.2.0-FriendlyARM/qtopia/include
    -I../qtopia-2.2.0-FriendlyARM/qt2/include -I.ui/release-shared/
    -I.moc/release-shared/ -o .obj/release-shared/main.o main.cpp
    /home/ubuntu/opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qt2/bi
    n/uic
    hello_base.ui -i hello_base.h -o .ui/release-shared/hello_base.cpp
    /home/ubuntu/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-g++ -c -pipe
    -DQWS -fno-exceptions -fno-rtti -Wall -W -Os -DQT_NO_QWS_VFB
    -DQTOPIA_DATA_LINKING -DQCONFIG="qconfig-qpe.h" -DQTOPIA_TARGET="hello"
    -DQTOPIA_TRTARGET="hello" -DQT_NO_DEBUG
    -I/home/ubuntu/opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qtop
    ia/mkspecs/qws/linux-arm-g++
    -I. -I../qtopia-2.2.0-FriendlyARM/qtopia/include
    -I../qtopia-2.2.0-FriendlyARM/qt2/include -I.ui/release-shared/
    -I.moc/release-shared/ -o .obj/release-shared/hello_base.o
    .ui/release-shared/hello_base.cpp
    /home/ubuntu/opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qt2/bi
    n/moc
    .ui/release-shared/hello_base.h -o .moc/release-shared/moc_hello_base.cpp
    /home/ubuntu/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-g++ -c -pipe
    -DQWS -fno-exceptions -fno-rtti -Wall -W -Os -DQT_NO_QWS_VFB
    -DQTOPIA_DATA_LINKING -DQCONFIG="qconfig-qpe.h" -DQTOPIA_TARGET="hello"
    -DQTOPIA_TRTARGET="hello" -DQT_NO_DEBUG
    -I/home/ubuntu/opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qtop
    ia/mkspecs/qws/linux-arm-g++
    -I. -I../qtopia-2.2.0-FriendlyARM/qtopia/include
    -I../qtopia-2.2.0-FriendlyARM/qt2/include -I.ui/release-shared/
    -I.moc/release-shared/ -o .obj/release-shared/moc_hello_base.o
    .moc/release-shared/moc_hello_base.cpp
    /home/ubuntu/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-g++ -o hello
    .obj/release-shared/hello.o .obj/release-shared/main.o
    .obj/release-shared/hello_base.o .obj/release-shared/moc_hello_base.o
    -luuid -lqtopia2 -lqtopia -lqpe
    -L/home/ubuntu/opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qtop
    ia/lib
    -L/home/ubuntu/opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qt2/
    lib
    -lqte
    /home/ubuntu/opt/FriendlyARM/toolschain/4.4.3/bin/../lib/gcc/arm-none-linux-gnue
    abi/4.4.3/../../../../arm-none-linux-gnueabi/bin/ld:
    cannot find -lqtopia2
    collect2: ld returned 1 exit status
    make: *** [hello] Errore 1

    There is somebody to help me?
    Thank you so much!
    Fede.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      msx_br
      wrote on last edited by
      #2

      You must have the qtopia libs in one of the folders listed by (type in your ubuntu terminal):

      @echo $LD_LIBRARY_PATH@

      You can find where the qtopia is installed by typing:

      @
      sudo updatedb
      locate libqtopia
      @

      msx_br - Brazil (Netherlands)

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Hi!
        First of all, thank you very much for your reply!

        Now I try your code from terminal and I have this:
        @
        ubuntu@ubuntu-VirtualBox:~$ echo $LD_LIBRARY_PATH

        ubuntu@ubuntu-VirtualBox:~$ sudo updatedb
        ubuntu@ubuntu-VirtualBox:~$ locate libqtopia
        /home/ubuntu/opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/lib/libqtopia.prl
        /home/ubuntu/opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/lib/libqtopia2.prl
        /home/ubuntu/opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/lib/libqtopiacalc.prl
        /home/ubuntu/opt/FriendlyARM/mini2440/rootfs_qtopia_qt4/opt/Qtopia/lib/libqtopia.so
        /home/ubuntu/opt/FriendlyARM/mini2440/rootfs_qtopia_qt4/opt/Qtopia/lib/libqtopia.so.1
        /home/ubuntu/opt/FriendlyARM/mini2440/rootfs_qtopia_qt4/opt/Qtopia/lib/libqtopia.so.1.6
        /home/ubuntu/opt/FriendlyARM/mini2440/rootfs_qtopia_qt4/opt/Qtopia/lib/libqtopia.so.1.6.3
        /home/ubuntu/opt/FriendlyARM/mini2440/rootfs_qtopia_qt4/opt/Qtopia/lib/libqtopia2.so
        /home/ubuntu/opt/FriendlyARM/mini2440/rootfs_qtopia_qt4/opt/Qtopia/lib/libqtopia2.so.2
        /home/ubuntu/opt/FriendlyARM/mini2440/rootfs_qtopia_qt4/opt/Qtopia/lib/libqtopia2.so.2.1
        /home/ubuntu/opt/FriendlyARM/mini2440/rootfs_qtopia_qt4/opt/Qtopia/lib/libqtopia2.so.2.1.0
        /home/ubuntu/opt/FriendlyARM/mini2440/rootfs_qtopia_qt4/opt/Qtopia/lib/libqtopiacalc.so
        /home/ubuntu/opt/FriendlyARM/mini2440/rootfs_qtopia_qt4/opt/Qtopia/lib/libqtopiacalc.so.2
        /home/ubuntu/opt/FriendlyARM/mini2440/rootfs_qtopia_qt4/opt/Qtopia/lib/libqtopiacalc.so.2.2
        /home/ubuntu/opt/FriendlyARM/mini2440/rootfs_qtopia_qt4/opt/Qtopia/lib/libqtopiacalc.so.2.2.0
        @

        Now what can I do?

        If can help, this is "qmake.conf" file:
        ---PATH:
        /home/ubuntu/opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/mkspecs/qws/linux-arm-g++/qmake.conf
        ---CONTENT:
        @

        $Id$

        qmake configuration for linux-g++ using the arm-linux-g++ crosscompiler

        MAKEFILE_GENERATOR = UNIX
        TEMPLATE = app
        CONFIG += qt link_prl

        QMAKE_CC = /home/ubuntu/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-gcc
        QMAKE_LEX = flex
        QMAKE_LEXFLAGS =
        QMAKE_YACC = yacc
        QMAKE_YACCFLAGS = -d
        QMAKE_CFLAGS = -pipe
        QMAKE_CFLAGS_WARN_ON = -Wall -W
        QMAKE_CFLAGS_WARN_OFF =
        QMAKE_CFLAGS_RELEASE = -Os
        QMAKE_CFLAGS_DEBUG = -g
        QMAKE_CFLAGS_SHLIB = -fPIC
        QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
        QMAKE_CFLAGS_THREAD = -D_REENTRANT

        QMAKE_CXX = /home/ubuntu/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-g++
        QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -DQWS -fno-exceptions -fno-rtti
        QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
        QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
        QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
        QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
        QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
        QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
        QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD

        QMAKE_INCDIR =
        QMAKE_LIBDIR =
        QMAKE_INCDIR_X11 =
        QMAKE_LIBDIR_X11 =
        QMAKE_INCDIR_QT = $(QTDIR)/include
        QMAKE_LIBDIR_QT = $(QTDIR)/lib
        QMAKE_INCDIR_OPENGL = /usr/X11R6/include
        QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
        QMAKE_INCDIR_QTOPIA = $(QPEDIR)/include
        QMAKE_LIBDIR_QTOPIA = $(QPEDIR)/lib

        QMAKE_LINK = /home/ubuntu/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-g++
        QMAKE_LINK_SHLIB = /home/ubuntu/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-g++
        QMAKE_LFLAGS =
        QMAKE_LFLAGS_RELEASE =
        QMAKE_LFLAGS_DEBUG =
        QMAKE_LFLAGS_SHLIB = -shared
        QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
        QMAKE_LFLAGS_SONAME = -Wl,-soname,
        QMAKE_LFLAGS_THREAD =
        QMAKE_RPATH = -Wl,-rpath,

        QMAKE_LIBS =
        QMAKE_LIBS_DYNLOAD = -ldl
        QMAKE_LIBS_X11 =
        QMAKE_LIBS_X11SM =
        QMAKE_LIBS_QT = -lqte
        QMAKE_LIBS_QT_THREAD = -lqte-mt
        QMAKE_LIBS_QT_OPENGL = -lqgl
        QMAKE_LIBS_QTOPIA = -lqtopia -lqpe
        QMAKE_LIBS_THREAD = -lpthread

        QMAKE_MOC = $(QTDIR)/bin/moc
        QMAKE_UIC = $(QTDIR)/bin/uic

        QMAKE_AR = ar cqs
        QMAKE_RANLIB =

        QMAKE_TAR = tar -cf
        QMAKE_GZIP = gzip -9f

        QMAKE_COPY = cp -f
        QMAKE_MOVE = mv -f
        QMAKE_DEL_FILE = rm -f
        QMAKE_DEL_DIR = rmdir
        QMAKE_STRIP = arm-linux-strip
        QMAKE_STRIPFLAGS_LIB = --strip-unneeded -R .note -R .comment
        QMAKE_CHK_DIR_EXISTS = test -d
        QMAKE_MKDIR = mkdir -p

        QMAKE_ARCH = arm

        exists($$(QPEDIR)/src/config.pri):include($$(QPEDIR)/src/config.pri)
        @

        1 Reply Last reply
        0
        • M Offline
          M Offline
          msx_br
          wrote on last edited by
          #4

          Your problem is linking, the compiler (linux-arm-g++) can't find the libqtopia2.so.

          The "echo $LD_LIBRARY_PATH" show the current "dynamic libraries available for linking", as you can see in your post (May 2, 2012) the echo $LD_LIBRARY_PATH command reports nothing.

          Try to type ih the ubuntu terminal:

          @
          export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/ubuntu/opt/FriendlyARM/mini2440/rootfs_qtopia_qt4/opt/Qtopia/lib/

          sudo ldconfig
          @

          In your post (may 1, 2012) the compiler can't find libqtopia: "cannot find -lqtopia2"
          With the above "export", the compiler will be able to link your program with libqtopia.

          Useful links:

          "qmake manual":http://doc.trolltech.com/4.6/qt-embedded-linux.html
          "Cross compiling Qt for embedded":http://doc.trolltech.com/4.6/qt-embedded-crosscompiling.html
          "Qt Embedded for Linux":http://doc.trolltech.com/4.6/qt-embedded-linux.html

          msx_br - Brazil (Netherlands)

          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            Hi Fedeponte, if you want to develop a program for mini2440, you can reference here: http://mini2440vietnam.blogspot.com/2011/05/programming-application-for-mini2440-by.html
            good luck

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved