12-16-2013 09:57 PM
I've posted about this before, and each time, i've thought i had it licked, but I'm still struggling to figure this out.
trying to optimize my app, and I find that I'm loading libraries that I don't (think i) need - like sqlite, socket, xml patterns, etc.
these are definitely not listed in the .cproject file, nor the .pro file. I can't find references to them anywhere.
are these required by the platform or something?
what am I missing? why can't i remove these?
Here's the line in question:
qcc -Vgcc_ntoarmv7le -lang-c++ -Wl,-rpath-link,C:/bbndk/target_10_1_0_4828/qnx6/a
rmle-v7/lib -Wl,-rpath-link,C:/bbndk/target_10_1_0_4828/qnx6/a rmle-v7/usr/lib -Wl,-rpath-link,C:/bbndk/target_10_1_0_4828/qnx6/a rmle-v7/usr/lib/qt4/lib -o o.le-v7-g/bron o.le-v7-g/.obj/ActiveFrame.o o.le-v7-g/.obj/applicationui.o o.le-v7-g/.obj/globals.o o.le-v7-g/.obj/Job.o o.le-v7-g/.obj/main.o o.le-v7-g/.obj/Task.o o.le-v7-g/.obj/WorkManager.o o.le-v7-g/.obj/moc_ActiveFrame.o o.le-v7-g/.obj/moc_applicationui.o o.le-v7-g/.obj/moc_Job.o o.le-v7-g/.obj/moc_Task.o o.le-v7-g/.obj/moc_WorkManager.o -LC:/bbndk/target_10_1_0_4828/qnx6/armle-v7/lib -LC:/bbndk/target_10_1_0_4828/qnx6/armle-v7/usr/li b -LC:/bbndk/target_10_1_0_4828/qnx6/armle-v7/usr/li b/qt4/lib -LC:/bbndk/target_10_1_0_4828/qnx6//usr/lib/qt4/li b -lbbmultimedia -lbb -lbbplatform -lbbcascades -lQtDeclarative -lQtScript -lQtSvg -lQtSql -lsqlite3 -lz -lQtXmlPatterns -lQtGui -lQtNetwork -lsocket -lQtCore -lm -lbps
and the options I'm curious about are these ones:
-lQtSvg -lQtSql -lsqlite3 -lz -lQtXmlPatterns -lQtNetwork -lsocket
if I do a full text search of my project directory, there is no trace of these (e.g. QtNetwork) anywhere in any of the files.
12-17-2013 04:50 AM
If you're curious you'll find these definitions baked into the makefile specifications used by qmake in the target specific BBNDK directory structure.In your case they should probably be here:
They eventually find their way onto the Makefile.Debug and Makefile.Release files that are built by qmake and which you'll find in the /arm directory of your project if you're building for a real device.
They may change between one device target version and another. You probably don't want to change anything in that area since in all probablility you'd break something in the build process for that target.
12-17-2013 05:07 AM
In addition to your point of "... I'm loading libraries that I don't (think i) need - like sqlite, socket, xml patterns, etc...." these external libraries are Shared Libraries. So, for example you'll find QtSvg references on the command as "-lQtSvg" here:
This library is not included physically into your application, it's a shared library and so it's included on the qcc command in order to resolve any external references to, say, functions that your application is using and keep the linker happy when you build your project. Your application will contain only references to these libraries.
When your application runs on the device itself the QtSVG library, for example, will be located here:
and loaded only if it's needed to resolve an external reference.
12-17-2013 08:59 AM
12-17-2013 09:37 AM
Ok, if you can see them loaded in the memory allocation then something must have done a "dlopen()" on an entry point in the shared library with the intent of calling it and caused the library to load. I've no insight as to what may be doing that. I'm speculating if it's a consequence of usng a Debug Build and whether they would be loaded in the case of a Release Build.