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
Trusted Contributor
Posts: 160
Registered: ‎09-13-2012
My Device: 9900
My Carrier: vodafone

Problem/Questions - QT

Hi all,

 

I have managed to compile a project in qt which initially was created in c. The project links to ffmpeg. I'm now struggling to go further with this project as it just exits after opening with the following output

 

Unable to find dynamic linker breakpoint function.

GDB will be unable to debug shared library initializers

and track explicitly loaded dynamic code.Unable to find dynamic linker breakpoint function.

GDB will be unable to debug shared library initializers

and track explicitly loaded dynamic code.Qml debugging is enabled. Only use this in a safe environment!

free malloc object that is not allocated:/builds/GR2_X_X-Worldbuild/latest/svn/lib/c/alloc/dlist.c:1071

Could not load shared library symbols for 46 libraries, e.g. libbps.so.3.

Use the "info sharedlibrary" command to see the complete listing.

Do you need "set solib-search-path" or "set sysroot"?Debugging has finished

Info: Sending request: Terminate

Info: Action: Terminate

Info: Terminating ID.testDev_ID_________91b_____...

result::Terminated

Info: done

 

Has anyone had this kind of error before when debugging? I also get an error message (something like preferred debugger binaries unknown unknown gdb )when loading. A question I need to ask is can we debug in qt on playbook device? Will/Should printf and cout show the strings outputted as I don't see any yet.

 

Thanks.

 

 

Trusted Contributor
Posts: 160
Registered: ‎09-13-2012
My Device: 9900
My Carrier: vodafone

Re: Problem/Questions - QT

I'm now attempting to use qt in momentics instead using a step by step guide i found. However I'm now left with an error on load to device which is 

Failed to load platform plugin "". Available platforms are: 

 

I run sample qt ui code in main but it just sticks on the blackberry splash screen after the error.

 

Anybody know what i can do to get around this? 

Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Problem/Questions - QT

What IDE (if any) do you use to handle this project?

 

>free malloc object that is not allocated:/builds/GR2_X_X-Worldbuild/latest/svn/lib/c/alloc/dlist.c:1071
isn't this the problem?

Trusted Contributor
Posts: 160
Registered: ‎09-13-2012
My Device: 9900
My Carrier: vodafone

Re: Problem/Questions - QT

I thought it might as well but I was receiving this when attempting with qt creator and the time it was taking to load on to the device was way too long so I have folowed the tutorial from 

 

http://bgmotey.blogspot.co.uk/2012/02/qthelloworld-in-momentics-ide-for.html

 

and gone through the threads/posts very carefully and now I have a button on a screen with a very small size app (considering) - yeah!

 

Maybe the malloc error is what I will have to look at next as I originally written some c code which is now being put in a c++ project. Which I think is the reason for that error. (My main reason for posting this question was to find out how to debug qt app on device - and for anyone else the answer is switch to momentics).

 

Thanks.

 

 

Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Problem/Questions - QT

Yes, I use Momentics with Qt (only C/C++) and the only problem I have is doing moc manually when you change something in your clasees that have Q_OBJECT.

Trusted Contributor
Posts: 160
Registered: ‎09-13-2012
My Device: 9900
My Carrier: vodafone

Re: Problem/Questions - QT

[ Edited ]

BGmot, its funny you mention moc, I'm just searching around for a reason for undefined reference to vtable for mywindow which is my class, i am new to c/c++ and there was a lot of mention to moc and this error but I have not seen a reference to it since looking into qt in the past days. 

 

I got this vtale error after changing my classs code around.

 

Am I missing something regarding moc?

Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Problem/Questions - QT

Yes for every .h file that contains class delcaration with Q_OBJECT you should in terminal run:

> cd <your project src folder>

>/Applications/bbndk/host_10_0_9_52/darwin/x86/usr/bin/moc -o moc_xxx.cpp xxx.h

It will produce moc_xxx.cpp file. The right click on src folder in you Project Explorer and select Refresh, now you shoud see moc_xxx.cpp added to your Project. Then build your project, should go fine.

Trusted Contributor
Posts: 160
Registered: ‎09-13-2012
My Device: 9900
My Carrier: vodafone

Re: Problem/Questions - QT

I'm nearly there, 


#include "mywindow.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'mywindow.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 63
#error "This file was generated using the moc from 4.8.3. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif

 

is in my moc output file after a refresh, I'm running this moc using msys..

 

c:/msys/1.0/qt/bin/moc -o moc_mywindow.cpp mywindow.h

 

I have had a look at my .h file and included #include <QObject> to no avail, what it telling me?

Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Problem/Questions - QT

Yes, moc must be from the same tree (version) you are using Qt libraries from.

Trusted Contributor
Posts: 160
Registered: ‎09-13-2012
My Device: 9900
My Carrier: vodafone

Re: Problem/Questions - QT

C:/QtPlaybookSDK/Playbook/Qt/4.8.1/bin/moc -o moc_mywindow.cpp mywindow.h results in the same error.