Mobility GPS plugin -- Fail to load custom library
BogDan
bog_dan_ro at yahoo.com
Fri Jun 3 16:51:21 CEST 2011
Done, please pull "experimental" branch of android-qt (android-lighthouse) repo !
Cheers,
BogDan.
>________________________________
>From: Frameworks <frameworks at qlands.com>
>To: "necessitas-devel at kde.org" <necessitas-devel at kde.org>
>Sent: Friday, June 3, 2011 5:43 PM
>Subject: Mobility GPS plugin -- Fail to load custom library
>
>
>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.
>
>_______________________________________________
>Necessitas-devel mailing list
>Necessitas-devel at kde.org
>https://mail.kde.org/mailman/listinfo/necessitas-devel
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/necessitas-devel/attachments/20110603/3ecf2579/attachment.htm
More information about the Necessitas-devel
mailing list