11-22-2012 06:11 AM - edited 11-22-2012 08:43 PM
The library that it uses is: libdeclarative_sensors.so
Full path:
${QNX_TARGET}/x86/usr/lib/qt4/imports/QtMobility/s
It should add this automatically for you, based on your config.
The includes and the libraries are the same as the ARM build. Nothing changes. You don't need to define anything related to the simulator.
Although, I just realised you probably don't have the ARM device.
11-22-2012 02:37 PM
As I mentioned in my original post. I do have the ARM device and the app builds and works fine on it. The problem is building for the simulator. One is ARM processor, another is x86 so the libraries are different.
My original report simply states that QtMobilitySimulator is reported missing by the build process. The build process automatically and correctly tried to include the correct library (like every other library btw. since these are not binary compatible). The QtMobilitySimulator library is missing and the linker cannot link the app.
I am using a Qt .pro style file to specify the features and libraries.
11-22-2012 06:32 PM - edited 11-22-2012 06:39 PM
As I mentioned in my last post QtMobilitySimulator is *not* what you want. There is no QtMobilitySimulator and never will be because that's for an unrelated simulator.
You want the same library and includes as the ARM build. The directory is automatically changed according to ${CPUVARDIR} (x86 or armle-v7).
Again, this is the library you want:
${QNX_TARGET}/x86/usr/lib/qt4/imports/QtMobility/sensors/libdeclarative_sensors.so
This is the ARM library:
${QNX_TARGET}/armle-v7/usr/lib/qt4/imports/QtMobil
They are both:
${QNX_TARGET}/${CPUVARDIR}/usr/lib/qt4/imports/QtM
If you want to see what libraries are available in the NDK you can look through ${QNX_TAGET}/${CPUVARDIR}
11-22-2012 07:18 PM
I understand that - I think we are fundametally not talking about the same issue.
To explain it better - please download the example accelerator game app from BB's github here
https://github.com/blackberry/Cascades-Samples/tre
Can you make that game run in your simulator? If so - how?
11-22-2012 08:39 PM - edited 11-22-2012 08:40 PM
Yes, that project is misconfigured. It should not be adding mobility.
In your .pro file:
Remove: CONFIG += mobility
Add: LIBS += -lQtSensors
The linker line should be identical for ARM and x86. It appears like this:
... -lQtSensors -lbb -lbbcascades -lQtDeclarative -lQtScript -lQtSvg -lQtSql -lQtXmlPatterns -lQtXml -lQtGui -lQtNetwork -lQtCore
11-22-2012 09:38 PM
That's exactly it! Thank you. I did not know that QtSensors was supported directly - this now makes perfect sense.
11-22-2012 11:21 PM
Spoke too soon. There's a real bug going on here.
If I remove the "mobility" from the CONFIG in the .pro file and perform full "Clean" before the build. The build fails with the following error
/Applications/bbndk/target_10_0_9_386/qnx6/usr/include/qt4/QtSensors/qsensor.h:45:29: fatal error: qmobilityglobal.h: No such file or directory
If I then remove the "mobility" from the CONFIG variable and build again. It builds and runs fine in the simulator. As long as I do not perform full clean, then build - everything is fine. If I clean it - I have to add mobility first, build with the above error, then remove mobility and build again for it to work.
So this is a workaround, but seems like a real bug. I will file it with the BB team.
11-23-2012 01:42 AM - edited 11-23-2012 01:56 AM
Sorry, I forgot, you'll also want to add:
INCLUDEPATH += ${QNX_TARGET}/usr/include/qt4/QtMobility
since we removed the mobility CONFIG (which was incorrecly setting QtMobilitySimulator).
It sets this on line 54 of ~/bbndk/target_10_0_9_386/qnx6/usr/share/qt4/mkspe
Just a naming issue because there are two 'simulators'. If you remove that line, the project should build unmodified.
11-23-2012 09:12 AM
Yes - that fixed it. I filed a bug anyway since this should obviously work with mobility in CONFIG as well.
Thank you for your help.