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
New Contributor
georgell87
Posts: 8
Registered: ‎03-01-2012
My Device: -

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
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook

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
georgell87
Posts: 8
Registered: ‎03-01-2012
My Device: -

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.. :Helpsmilie:

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

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
georgell87
Posts: 8
Registered: ‎03-01-2012
My Device: -

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..

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

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
georgell87
Posts: 8
Registered: ‎03-01-2012
My Device: -

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
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook

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.