03-02-2012 08:48 PM - edited 03-02-2012 08:49 PM
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
cc: no files to process
make: *** [helloworld] Error 1
and nothing gets built... What am I doing wrong? Thanks again for your assistance!
03-02-2012 08:53 PM
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.
03-02-2012 09:08 PM
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.. ![]()
03-02-2012 09:11 PM
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.
03-02-2012 09:15 PM
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..
03-02-2012 09:18 PM
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/
03-02-2012 09:55 PM
The https://BGmot@github.com/BGmot/Qt.git repository, is it any different from the one that RIM maintains on github?
03-02-2012 10:04 PM
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.