Qt for android, fail to load own so library

  • I use ndk to export a class in libmedia.so, and link it with a Qt for android application.

    I failed to start the application on android device.

    the eclipse logcat shows following errors:

    04-11 12:12:27.803: E/linker(22533): soinfo_relocate(linker.cpp:992): cannot locate symbol "_ZN5MediaC1Ev" referenced by "libMediaAndroid.so"...
    04-11 12:12:27.803: E/dalvikvm(22533): dlopen("/data/app-lib/org.qtproject.example.MediaAndroid-2/libMediaAndroid.so") failed: Cannot load library: soinfo_relocate(linker.cpp:992): cannot locate symbol "_ZN5MediaC1Ev" referenced by "libMediaAndroid.so"...

    I checked libmedia.so using nm:
    nm libmedia.so

    I got followings

    0000e5c3 T _ZN5Media10InitPlayerEPc
    0000e6d5 T _ZN5Media11StopPlayingEv
    0000e6f1 T _ZN5Media12GotoPositionEi
    0000e57b T _ZN5Media12InitRecorderEPc
    0000e6cb T _ZN5Media12PausePlayingEv
    0000e69b T _ZN5Media12StartPlayingEv
    0000e67d T _ZN5Media13StopRecordingEv
    0000e673 T _ZN5Media14PauseRecordingEv
    0000e645 T _ZN5Media14StartRecordingEv
    0000e6c1 T _ZN5Media15ContinuePlayingEv
    0000e669 T _ZN5Media17ContinueRecordingEv
    0000e6f9 T _ZN5Media19GetPlayFileDurationEv
    0000e555 T _ZN5Media4InitEv
    0000e5f1 T _ZN5Media7ReleaseEv
    0000e703 T _ZN5Media9FlushFileEv
    0000e515 T _ZN5MediaC1Ev
    0000e515 T _ZN5MediaC2Ev
    0000ea61 T _ZN5MediaD1Ev
    0000ea61 T _ZN5MediaD2Ev

    I can find the symbol in libmedia.so, what is the problem, why I can load my so in Qt for android application?

  • I rename libmedia.so, seem can load now

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.