Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Can I include a C library in a Qt Android application?
Forum Updated to NodeBB v4.3 + New Features

Can I include a C library in a Qt Android application?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
4 Posts 3 Posters 3.5k Views 2 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.
  • S Offline
    S Offline
    SaundersB
    wrote on last edited by
    #1

    Basically, I want to include some C or C++ libraries into my Qt project, and then build for both Windows and Android. Without the library I'm currently able to build with no problems.

    mrjjM 1 Reply Last reply
    0
    • S SaundersB

      Basically, I want to include some C or C++ libraries into my Qt project, and then build for both Windows and Android. Without the library I'm currently able to build with no problems.

      mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @SaundersB

      Hi
      You can start here
      http://doc.qt.io/qtcreator/creator-project-qmake-libraries.html
      http://doc.qt.io/qt-5/third-party-libraries.html
      This is for adding it to your main app.

      Also read the "build me" information for the lib. You must be able to build it yourself to be able to cross compile it
      for both and/win. So this step comes first.

      Not sure it answers what you ask. Its very open.

      1 Reply Last reply
      2
      • S Offline
        S Offline
        SaundersB
        wrote on last edited by SaundersB
        #3

        More Information

        I'm attempting to develop a cross-platform application for both Window x86 desktop, and an Android application. I have successfully integrated the .lib file into Windows desktop application with Qt Creator. I have some .so library files, but I believe those files are Java library files.

        End Goals

        I'd either like to compile a Linux version of libraries for use in C++ with Qt Creator, or include the .so files for use with Java. The only thing that troubles me with the latter is being able to switch between libraries in the same code base. Plus, I'm not sure how to include Java code in a Qt project for Android.

        Primarily, keeping everything in C++ for both Windows and Android is preferred.

        Would I need to build the library in Qt Creator? Or is that for convenience?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          .so files are dynamic libraries on Linux not Java libraries. You can link to your libraries following the same links provided by @mrjj.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1

          • Login

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