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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Contributor
Posts: 8
Registered: ‎03-01-2012
My Device: -
My Carrier: -

Re: qmake error while building QT app for PlayBook

[ Edited ]

I used this as my main.cpp

 

#include <QApplication>
#include <QPushButton>
int main(int argc, char *argv[])
{
qputenv("QT_QPA_FONTDIR", "/usr/fonts/font_repository/liberation");
QApplication app(argc, argv);
QPushButton button("Hello Playbook World!");
QObject::connect(&button, SIGNAL(clicked()), &app, SLOT(quit()));
button.show();
return app.exec();
}

 

I run qmake, a makefile gets created, but when I run make afterwards, I get

 

george@ubuntu:~/helloworld$ ~/Qt/stage/nto/armle-v7/usr/lib/qt4/bin/qmake

george@ubuntu:~/helloworld$ make
qcc -Vgcc_ntoarmv7le -lang-c++ -Wl,-rpath-link,/home/george/Qt/stage/nto/armle-v7/lib -Wl,-rpath-link,/home/george/Qt/stage/nto/armle-v7/usr/lib -Wl,-rpath,'./app/native/lib' -Wl,-O1 -o helloworld     -L/home/george/Qt/stage/nto/armle-v7/lib -L/home/george/Qt/stage/nto/armle-v7/usr/lib -L/home/george/Qt/stage/nto/armle-v7/usr/lib/qt4/lib -lQtGui -L/home/george/Qt/stage/nto/armle-v7/usr/lib/qt4/lib -L/home/george/Qt/stage/nto/armle-v7/lib -L/home/george/Qt/stage/nto/armle-v7/usr/lib -lQtCore -lm
cc: no files to process
make: *** [helloworld] Error 1

 

and nothing gets built... What am I doing wrong? Thanks again for your assistance!

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

Re: qmake error while building QT app for PlayBook

There is no main.cpp in your qcc command. So something is wrong with your .pro file I assume because qmake does not generate proper Makefile.

New Contributor
Posts: 8
Registered: ‎03-01-2012
My Device: -
My Carrier: -

Re: qmake error while building QT app for PlayBook

Right! I added the SOURCES += main.cpp in my .pro file and now make works successfully.

 

Afterwards I run make helloworld.bar, the bar file gets created, but when I deploy it on the simulator, it crashes with error 8..

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

Re: qmake error while building QT app for PlayBook

Error 8 means bad binary.

You are building for ARM architecture (Playbook) but deploying to Simulator. You should compile/link for x86 (to be able to run it on Simulator.

New Contributor
Posts: 8
Registered: ‎03-01-2012
My Device: -
My Carrier: -

Re: qmake error while building QT app for PlayBook

Aha... Do you know what do I have to change to build for x86 ?

 

I run apps intended for the device though on the simulator, so I thought that it's compatible with those built for the device..

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

Re: qmake error while building QT app for PlayBook

I can't give you clear instructions now on how to do it from command line but the way I did it in NDK I described here http://bgmotey.blogspot.com/

New Contributor
Posts: 8
Registered: ‎03-01-2012
My Device: -
My Carrier: -

Re: qmake error while building QT app for PlayBook

The https://BGmot@github.com/BGmot/Qt.git repository, is it any different from the one that RIM maintains on github?

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

Re: qmake error while building QT app for PlayBook

Just a little bit. I corrected what I thought whould be corrected.

Probably you can skip the step of compiling QT libraries if you have downloaded precompiled QT libraries for x86 platform. I just never used them, can't give you advice here.