<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Hi Carlos,</span></div><div><br><span></span></div><div><span>I've screw up again the qmake rules files, soon I'll push an fix to experimental branch.</span></div><div><br><span></span></div><div><span>Sorry,</span></div><div><br><span></span></div><div><span>Cheers,<br></span></div><div><span>BogDan.<br></span></div><div><span> </span></div><div><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><font face="Arial" size="2"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Frameworks <frameworks@qlands.com><br><b><span style="font-weight: bold;">To:</span></b>
"necessitas-devel@kde.org" <necessitas-devel@kde.org><br><b><span style="font-weight: bold;">Sent:</span></b> Friday, June 3, 2011 5:43 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Mobility GPS plugin -- Fail to load custom library<br></font><br>
<meta http-equiv="x-dns-prefetch-control" content="off"><div id="yiv1354026581">
Hi,<br>
<br>
This is Carlos Quiros.<br>
<br>
I am working on a mobility GPS plugin. For this I am playing around
loading libraries. I created the library with the same Necessitas QT
creator that I use in the testing example. So I create this library
<a target="_blank" href="http://libIMPInterface.so">libIMPInterface.so</a>. This has the following pro:<br>
<br>
<i>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</i><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: <i>System.load(libraries[i])
</i>So as an example I added my custom library like:<br>
<br>
<i>try<br>
{<br>
System.load("/sdcard/Android/data/org.ilri.GPSTest/libInterface.so");
//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>
}</i><br>
<br>
But I am getting the following error:<br>
<br>
<i><b>D/dalvikvm( 292): Trying to load lib
/sdcard/Android/data/org.ilri.GPSTest/libInterface.so 0x44edea38<br>
I/dalvikvm( 292): Unable to
dlopen(/sdcard/Android/data/org.ilri.GPSTest/libInterface.so): Cannot
load library: load_segments[907]: 33 failed to map segment from
'<a target="_blank" href="http://libInterface.so">libInterface.so</a>' @ 0x80b00000 (0x00003e28). p_vaddr=0x00000000
p_offset=0x00000000</b></i><br>
<br>
And then of course I get:<br>
<br>
<i><b>E/AndroidRuntime( 292): java.lang.UnsatisfiedLinkError: Library
/sdcard/Android/data/org.ilri.IMPACTLight/libIMPInterface.so not found</b></i><br>
<br>
<br>
Any idea what I am doing wrong? Do the libraries need to have any
special signature/form for the Dalvik VM to load them? Or I cannot use
Necessitas QT creator to make libraries?<br>
<br>
Many thanks guys and girls!<br>
<br>
Carlos.<br>
</div><meta http-equiv="x-dns-prefetch-control" content="on"><br>_______________________________________________<br>Necessitas-devel mailing list<br><a ymailto="mailto:Necessitas-devel@kde.org" href="mailto:Necessitas-devel@kde.org">Necessitas-devel@kde.org</a><br><a href="https://mail.kde.org/mailman/listinfo/necessitas-devel" target="_blank">https://mail.kde.org/mailman/listinfo/necessitas-devel</a><br><br><br></div></div></blockquote></div></div></body></html>