0

我有两个级联项目。

我从一个项目构建了一个共享库 (.so),在另一个项目中我使用了这个 .so 文件。

要构建这个 (.so) 文件,我们使用以下 .pro 文件-

APP_NAME = XYZ

TEMPLATE = lib

TARGET = XYZ

CONFIG += qt warn_on debug_and_release cascades

LIBS   += -lpps -lscreen -lEGL -lGLESv1_CM -lfreetype -lpng -lbb -ljpeg -lbbdata -lbbsystem -lbbdevice -lsqlite3 -lbbutility

include(config.pri)

现在要添加这个 (.so) 文件,我遵循这个知识库

现在的问题是我无法在 Q10 和 Z10 设备上使用 Device-Release 运行我的应用程序。以下错误来自 qnx 编译器 -

unable to release application on target

但是设备调试和模拟器调试工作正常。

奇怪的是,如果我在没有(.so)文件的情况下构建我的应用程序,它在 Device-Release 上工作。所以,我怀疑是(.so)里面的问题。可能正在构建(.so)文件有一些问题。

我在谷歌搜索了很多并尝试关注以下内容 -

更改条形描述符

编译库和资源

但这一切对我来说都不是锻炼。非常需要你的帮助。提前致谢。

4

1 回答 1

1

I have never been able to get this to work. I believe it has something to do with the building of the Cascades zygote for the Device-Release build, but I haven't really looked into it too much.

On further consideration I decided to use static libraries. If you use shared object libraries, then all of the code included in the library must be on the device. This is very efficient for widely used libraries like the C standard library because many programs can like against them. For your own library though, you have to include the library with your program, so you will be including object code whether or not it actually gets called in your program. If the library eventually grows to a large size, and you only use a small part of it this gets wasteful. When you statically link to a library, only those object modules that are actually needed in your program get included.

于 2013-09-12T15:02:59.200 回答