Results 1 to 4 of 4

Thread: Using 3rd part static library with QT Creator in Win7

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2014
    Posts
    2
    Thanks
    2
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Using 3rd part static library with QT Creator in Win7

    thanks for the answer.

    i used compiler from Android NDK and built 'libusb' for Android (i have downloaded the source files from the github). In result i got libs and obj folders with .so files in it.

    So, i updated my .pro file accordingly...


    Qt Code:
    1. unix:!macx: LIBS += -L$$PWD/../../libusb-master/android/libs/armeabi-v7a/ -lusb1.0
    2.  
    3. INCLUDEPATH += $$PWD/../../libusb-master/android/libs/armeabi-v7a
    4. DEPENDPATH += $$PWD/../../libusb-master/android/libs/armeabi-v7a
    To copy to clipboard, switch view to plain text mode 

    ...and it finally compiled successfully.

    Unfortunately, my program fails to start on Android tablet and QT creator shows the following:

    Qt Code:
    1. Starting remote process.
    2.  
    3. Unable to start "org.qtproject.example.HidManager".
    To copy to clipboard, switch view to plain text mode 

    Checked the logcat and found:

    Qt Code:
    1. E/dalvikvm(13795): dlopen("/data/app-lib/org.qtproject.example.HidManager-1/libH
    2. idManager.so") failed: Cannot load library: soinfo_link_image(linker.cpp:1635):
    3. could not load library "libusb1.0.so" needed by "libHidManager.so"; caused by lo
    4. ad_library(linker.cpp:745): library "libusb1.0.so" not found
    To copy to clipboard, switch view to plain text mode 


    What could be the suggestions what i am doing wrong here (again)?

    BTW, when removing the usage of libusb library from the project, application on android runs successfully.
    Last edited by daynen; 11th November 2014 at 12:20.

  2. #2
    Join Date
    Oct 2012
    Posts
    132
    Thanks
    10
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Using 3rd part static library with QT Creator in Win7

    Since you're linking dynamically against libusb you need to deploy the library with your application. You can use ANDROID_EXTRA_LIBS to achieve that.
    Have a look at the documentation: http://qt-project.org/doc/qt-5/deployment-android.html

  3. The following user says thank you to Infinity for this useful post:

    daynen (13th November 2014)

Similar Threads

  1. Linking Static Library with Qt Creator
    By augusbas in forum Qt Tools
    Replies: 3
    Last Post: 12th September 2013, 06:08
  2. win7 x64 + mingw32 + static build failed
    By dkoryagin in forum Installation and Deployment
    Replies: 0
    Last Post: 8th August 2013, 08:46
  3. Replies: 1
    Last Post: 28th August 2011, 00:18
  4. Replies: 2
    Last Post: 19th February 2011, 11:26
  5. Replies: 1
    Last Post: 18th February 2011, 11:08

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.