Mobility GPS plugin -- Fail to load custom library

Frameworks frameworks at qlands.com
Fri Jun 3 11:43:41 CEST 2011


Hi,

This is Carlos Quiros.

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 
libIMPInterface.so. This has the following pro:

/QT += sql
TARGET = $$qtLibraryTarget(Interface)
TEMPLATE = lib
SOURCES += \
     ../../interfaces.cpp
HEADERS += ../../interfaces.h
INCLUDEPATH += ../../
DESTDIR = /sdcard/Android/data/org.ilri.GPSTest/


Note:
DESTDIR for now is fixed... Because is a test

I saw that QApplication.java load the QT libraries using: 
/System.load(libraries[i]) /So as an example I added my custom library like:

/try
         {
             
System.load("/sdcard/Android/data/org.ilri.GPSTest/libInterface.so"); 
//This is fix... I am just testing loading my GPS library!
         }
         catch (SecurityException e)
         {
             Log.i(QtTAG, "Can't load '" + "'", e);
         }
         catch (Exception e)
         {
             Log.i(QtTAG, "Can't load '" + "'", e);
         }/

But I am getting the following error:

/*D/dalvikvm(  292): Trying to load lib 
/sdcard/Android/data/org.ilri.GPSTest/libInterface.so 0x44edea38
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 
'libInterface.so' @ 0x80b00000 (0x00003e28). p_vaddr=0x00000000 
p_offset=0x00000000*/

And then of course I get:

/*E/AndroidRuntime(  292): java.lang.UnsatisfiedLinkError: Library 
/sdcard/Android/data/org.ilri.IMPACTLight/libIMPInterface.so not found*/


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?

Many thanks guys and girls!

Carlos.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/necessitas-devel/attachments/20110603/2d83bb1b/attachment.htm 


More information about the Necessitas-devel mailing list