Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
AlterX
Posts: 46
Registered: ‎08-21-2012
My Device: Blackberry z10 LE
Accepted Solution

Porting Qt project QtLocation errorr

Hello there,

I'am trying to port my own Qt project that use gps; even I have add -lQtLocationSubset in .pro file, it always try to link to QtLocation...this is just where I got the problem:

...

qrc_AppImages.o qrc_Qmls.o qrc_JavaScripts.o qrc_Audio.o qrc_RadioVoice.o -LC:/bbndk/target_10_1_0_338/qnx6/armle-v7/lib -LC:/bbndk/target_10_1_0_338/qnx6/armle-v7/usr/lib -LC:/bbndk/target_10_1_0_338/qnx6/armle-v7/usr/lib/qt4/lib -lQtLocationSubset -lQtMultimediaKit -lQtSensors -LC:/bbndk/target_10_1_0_338/qnx6/usr/share/qt4/lib -lQtLocation -lQtDeclarative -lQtScript -lQtSvg -lQtXmlPatterns -lQtSql -lsqlite3 -lz -lQtGui -lQtNetwork -lsocket -lQtCore -lm -lbps

C:\bbndk\host_10_1_0_1\win32\x86\usr\bin\ntoarm-ld: cannot find -lQtLocation

cc: C:/bbndk/host_10_1_0_1/win32/x86/usr/bin/ntoarm-ld caught signal 1

--------------------------------------------------------------------------------------------------------------

How I can resolve that below??

 

Thanks

Giovanni

 

Nokia Qt Ambassador
http://www.softairrealfight.net
Developer
Zmey
Posts: 1,512
Registered: ‎12-18-2012
My Device: PlayBook, Z10, DAC

Re: Porting Qt project QtLocation errorr

Hi,

 

The error message shows you've added

LIBS += -lQtLocation

 

Tried to search QtLocationSubset with grep:

Binary file target_10_0_9_2318/qnx6/armle-v7/usr/lib/libQtLocationSubset.so matches

Binary file target_10_0_9_2318/qnx6/armle-v7/usr/lib/libbbcascadesmaps.so matches

 

Try adding to .pro file:

LIBS += -lQtLocationSubset -lbbcascadesmaps

 


Andrey Fidrya, @zmeyc on twitter
Developer
AlterX
Posts: 46
Registered: ‎08-21-2012
My Device: Blackberry z10 LE

Re: Porting Qt project QtLocation errorr

I have no QtLocation in my .pro file, I have added -lbbcascadesmaps without success. I didn't get what you mean with "search QtLocationSubset with grep"
Nokia Qt Ambassador
http://www.softairrealfight.net
BlackBerry Development Advisor
jehrismann
Posts: 68
Registered: ‎10-15-2012
My Device: Z10

Re: Porting Qt project QtLocation errorr

[ Edited ]

Do you have

 

QT += location

 

in your .pro file? (You should not).

 

Also note that QtLocationSubset classes are in the namespace QtMobilitySubset.

Developer
AlterX
Posts: 46
Registered: ‎08-21-2012
My Device: Blackberry z10 LE

Re: Porting Qt project QtLocation errorr

Hi as I told I have no QtLocation referenced within .pro file and I'm using all namespaces required. As you can see in the output it tries to link both library that dosn't make sense

Nokia Qt Ambassador
http://www.softairrealfight.net
BlackBerry Development Advisor
jehrismann
Posts: 68
Registered: ‎10-15-2012
My Device: Z10

Re: Porting Qt project QtLocation errorr

Hi,

 

I am not aware of anything in the configuration of Qt or default project files on BB10 that would cause -lQtLocation to be added as a linker option. There must be something in your setup/project file(s) that is causing this. I see you also link against QtSensors, do you have something like this in a project file:

 

CONFIG += mobility
MOBILITY += sensors

 If you have location listed as part of MOBILITY you should remove it. Or try:

 MOBILITY -= location

 ?

 

Jim

Developer
AlterX
Posts: 46
Registered: ‎08-21-2012
My Device: Blackberry z10 LE

Re: Porting Qt project QtLocation errorr

[ Edited ]

No more,

in my .pro file I have:

LIBS+= -lQtSensors -lQtLocationSubset

 I have deleted any Qt style mobility references for sensors and location.

Nokia Qt Ambassador
http://www.softairrealfight.net
BlackBerry Development Advisor
jehrismann
Posts: 68
Registered: ‎10-15-2012
My Device: Z10

Re: Porting Qt project QtLocation errorr

Did you do a clean build after? (asking just to be sure)

Developer
AlterX
Posts: 46
Registered: ‎08-21-2012
My Device: Blackberry z10 LE

Re: Porting Qt project QtLocation errorr

It works with MOBILITY -= location
Nokia Qt Ambassador
http://www.softairrealfight.net