Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Can I include a C library in a Qt Android application?
SaundersB last edited by
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.
You can start here
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.
SaundersB last edited by SaundersB
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.
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?
.so files are dynamic libraries on Linux not Java libraries. You can link to your libraries following the same links provided by @mrjj.