<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div>Done, please pull "experimental" branch of android-qt (android-lighthouse) repo !<br></div><div><br></div><div>Cheers,</div><div>BogDan.<br><br>>________________________________<br>>From: Frameworks <frameworks@qlands.com><br>>To: "necessitas-devel@kde.org" <necessitas-devel@kde.org><br>>Sent: Friday, June 3, 2011 5:43 PM<br>>Subject: Mobility GPS plugin -- Fail to load custom library<br>><br>><br>>Hi,<br>><br>>This is Carlos Quiros.<br>><br>>I am working on a mobility GPS plugin. For this I am playing around<br>loading libraries. I created the library with the same Necessitas QT<br>creator that I use in the testing example. So I create this library libIMPInterface.so. This has the following pro:<br>><br>>QT += sql<br>>TARGET =
$$qtLibraryTarget(Interface)<br>>TEMPLATE = lib<br>>SOURCES += \ <br>> ../../interfaces.cpp<br>>HEADERS += ../../interfaces.h<br>>INCLUDEPATH += ../../ <br>>DESTDIR = /sdcard/Android/data/org.ilri.GPSTest<br>><br>><br>>Note:<br>>DESTDIR for now is fixed... Because is a test<br>><br>>I saw that QApplication.java load the QT libraries using: System.load(libraries[i]) So as an example I added my custom library like:<br>><br>>try<br>> {<br>> <br>System.load("/sdcard/Android/data/org.ilri.GPSTest/libInterface.so");<br>//This is fix... I am just testing loading my GPS library!<br>> }<br>> catch (SecurityException e)<br>>
{<br>> Log.i(QtTAG, "Can't load '" + "'", e);<br>> }<br>> catch (Exception e)<br>> {<br>> Log.i(QtTAG, "Can't load '" + "'", e);<br>> }<br>><br>>But I am getting the following error:<br>><br>>D/dalvikvm( 292): Trying to load lib<br>/sdcard/Android/data/org.ilri.GPSTest/libInterface.so 0x44edea38<br>>I/dalvikvm( 292): Unable to<br>dlopen(/sdcard/Android/data/org.ilri.GPSTest/libInterface.so): Cannot<br>load library: load_segments[907]: 33 failed to map segment from<br>'libInterface.so' @ 0x80b00000 (0x00003e28). p_vaddr=0x00000000<br>p_offset=0x00000000<br>><br>>And then of course I
get:<br>><br>>E/AndroidRuntime( 292): java.lang.UnsatisfiedLinkError: Library<br>/sdcard/Android/data/org.ilri.IMPACTLight/libIMPInterface.so not found<br>><br>><br>>Any idea what I am doing wrong? Do the libraries need to have any<br>special signature/form for the Dalvik VM to load them? Or I cannot use<br>Necessitas QT creator to make libraries?<br>><br>>Many thanks guys and girls!<br>><br>>Carlos.<br>><br>>_______________________________________________<br>>Necessitas-devel mailing list<br>>Necessitas-devel@kde.org<br>><a target="_blank" href="https://mail.kde.org/mailman/listinfo/necessitas-devel">https://mail.kde.org/mailman/listinfo/necessitas-devel</a><br>><br>><br>></div></div></body></html>