Results 1 to 2 of 2

Thread: Rpath linking issues in qtcreator

  1. #1
    Join Date
    Jul 2011
    Posts
    1
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11 Maemo/MeeGo

    Exclamation Rpath linking issues in qtcreator

    I am trying to build an app using Qt-Creator and Qt-embedded.

    I use the following qmake / make:

    qmake /home/paxuser/Desktop/PAXSVN/FancyBrowser/fancybrowser/fancybrowser.pro -spec /home/paxuser/Desktop/PAXSVN/targetfs/filesystem/mkspecs/qws/arm-none-linux-gnueabi-g++ -r CONFIG+=debug_and_release CPPFLAGS=-I/home/paxuser/Desktop/PAXSVN/targetfs/filesystem/include LDFLAGS+=-L/home/paxuser/Desktop/PAXSVN/targetfs/filesystem/lib QMAKE_RPATHDIR+=/home/paxuser/Desktop/PAXSVN/targetfs/filesystem/lib/libts.0.0.so.0

    make release -w in /home/paxuser/Desktop/PAXSVN/FancyBrowser/fancybrowser

    Which results in:

    Running build steps for project fancybrowser...
    Starting: /home/paxuser/Desktop/PAXSVN/FancyBrowser/qt-everywhere-opensource-src-4.6.2/bin/qmake /home/paxuser/Desktop/PAXSVN/FancyBrowser/fancybrowser/fancybrowser.pro -spec /home/paxuser/Desktop/PAXSVN/targetfs/filesystem/mkspecs/qws/arm-none-linux-gnueabi-g++ -r CONFIG+=debug_and_release CPPFLAGS=-I/home/paxuser/Desktop/PAXSVN/targetfs/filesystem/include LDFLAGS+=-L/home/paxuser/Desktop/PAXSVN/targetfs/filesystem/lib QMAKE_RPATHDIR+=/home/paxuser/Desktop/PAXSVN/targetfs/filesystem/lib/libts.0.0.so.0
    Exited with code 0.
    Starting: /usr/bin/make release -w
    make: Entering directory `/home/paxuser/Desktop/PAXSVN/FancyBrowser/fancybrowser'
    /usr/bin/make -f Makefile.Release
    make[1]: Entering directory `/home/paxuser/Desktop/PAXSVN/FancyBrowser/fancybrowser'
    /home/paxuser/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-g++ -Wl,-O1 -Wl,-rpath,/opt/qt-embedded/lib -Wl,-rpath,/home/paxuser/Desktop/PAXSVN/targetfs/filesystem/lib/libts.0.0.so.0 -o fancybrowser release/main.o release/mainwindow.o release/moc_mainwindow.o release/qrc_jquery.o -L/home/paxuser/Desktop/PAXSVN/targetfs/filesystem/lib -L/home/paxuser/Desktop/PAXSVN/targetfs/filesystem//lib -lQtWebKit -L/home/paxuser/Desktop/PAXSVN/targetfs/filesystem//lib -L/home/paxuser/Desktop/PAXSVN/targetfs/filesystem/lib -lQtGui -lQtNetwork -lQtCore -lpthread
    /home/paxuser/CodeSourcery/Sourcery_G++_Lite/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: libts-0.0.so.0, needed by /home/paxuser/Desktop/PAXSVN/targetfs/filesystem/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
    /home/paxuser/Desktop/PAXSVN/targetfs/filesystem/lib/libQtGui.so: undefined reference to `ts_read_raw'
    /home/paxuser/Desktop/PAXSVN/targetfs/filesystem/lib/libQtGui.so: undefined reference to `ts_open'
    /home/paxuser/Desktop/PAXSVN/targetfs/filesystem/lib/libQtGui.so: undefined reference to `ts_fd'
    /home/paxuser/Desktop/PAXSVN/targetfs/filesystem/lib/libQtCore.so: undefined reference to `QInotifyFileSystemWatcherEngine::create()'
    /home/paxuser/Desktop/PAXSVN/targetfs/filesystem/lib/libQtCore.so: undefined reference to `clock_gettime'
    /home/paxuser/Desktop/PAXSVN/targetfs/filesystem/lib/libQtGui.so: undefined reference to `ts_config'
    /home/paxuser/Desktop/PAXSVN/targetfs/filesystem/lib/libQtCore.so: undefined reference to `QDnotifyFileSystemWatcherEngine::create()'
    /home/paxuser/Desktop/PAXSVN/targetfs/filesystem/lib/libQtGui.so: undefined reference to `ts_close'
    /home/paxuser/Desktop/PAXSVN/targetfs/filesystem/lib/libQtGui.so: undefined reference to `ts_read'
    collect2: ld returned 1 exit status
    make[1]: *** [fancybrowser] Error 1
    make[1]: Leaving directory `/home/paxuser/Desktop/PAXSVN/FancyBrowser/fancybrowser'
    make: Leaving directory `/home/paxuser/Desktop/PAXSVN/FancyBrowser/fancybrowser'
    make: *** [release] Error 2
    Exited with code 2.
    Error while building project fancybrowser
    When executing build step 'Make'


    I am not sure why I get an error when pointing directly at the file...

    Thanks for the help!

  2. #2
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Rpath linking issues in qtcreator

    rpath is a path, not a file. QMAKE_RPATHDIR is the same. You're telling it to look for a directory named libts.0.0.so.0, which doesn't exist, so it can't locate the libraries you're trying to point it to. Get rid of the library name and just give it the path; add your library as you normally would, using -l<library_name>.

Similar Threads

  1. Suggestion in library inclusion with rpath
    By jepessen in forum Newbie
    Replies: 2
    Last Post: 9th May 2011, 09:07
  2. How to set rpath in Qt Project?
    By Kevin Hoang in forum General Programming
    Replies: 2
    Last Post: 30th March 2011, 03:05
  3. Linking a foreign static library using QtCreator
    By gib in forum Qt Programming
    Replies: 0
    Last Post: 22nd September 2010, 02:52
  4. Static Linking Ordering Issues
    By SneakyPeterson in forum Newbie
    Replies: 1
    Last Post: 11th June 2010, 11:51
  5. QT Creator Linking issues
    By sgrant327 in forum Qt Programming
    Replies: 14
    Last Post: 16th December 2009, 15:42

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.