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
Zingam
Posts: 195
Registered: ‎05-09-2012
My Device: Playbook, Z10 LE

NDK Beta 4 + Simulator + Qt Creator 2.6 - problem

I have installed Qt Creator 2.6 and then BB10 NDK. Then I congiured everything according to:

http://qt-project.org/wiki/Qt-Creator-with-BlackBerry-10

 

When I build and deploy to the simulator. An icon appears in the simulator but the app doesn't run. All I get is:

Error: Failed to create application process: Exec format error

 

Am I doing something wrong? These are my settings:

 

I have a .bat file to start Qt Creator 2.6 on Windows, which contains:

 

set QNX_TARGET=C:/bbndk/target_10_0_9_1101/qnx6
set QNX_HOST=C:/bbndk/host_10_0_9_284/win32/x86
set QNX_CONFIGURATION=C:\Users\Hristo\AppData\Local\Research In Motion\BlackBerry Native SDK
set MAKEFLAGS=-I%QNX_TARGET%/usr/include
set PATH=%QNX_HOST%\usr\bin;%QNX_CONFIGURATION%\bin;C:\bbndk\ide\win32\x86\eclipse\jre\bin;%PATH%
set PYTHONPATH=
set QDE=C:\bbndk\ide\win32\x86

REM set CPUVARDIR=armle-v7
set CPUVARDIR=x86

C:\Qt\qtcreator-2.6.0\bin\qtcreator.exe

 

Then I have created a compiler

 

BB10 QCC (x86)
C:\bbndk\host_10_0_9_284\win32\x86\usr\bin\qcc.exe
ABI: custom - x86 - linux - generic - elf - 32bit

 

Qt version seem to be properly set as:

 

Qt 4.8.4 (System)
qmake location: C:\bbndk\host_10_0_9_284\win32\x86\usr\bin\qmake.exe
BlackBerry Native SDK: c:\bbndk

Qt version 4.8.4 for BlackBerry ARMle-v7
Helpers: None available


----


Name: Qt 4.8.4 (System)
ABI: x86-linux-generic-elf-32bit
Source: C:\bbndk
mkspec: default
qmake: C:\bbndk\host_10_0_9_284\win32\x86\usr\bin\qmake.exe
Version: 4.8.4
QMAKE_VERSION 2.01a
QT_HOST_BINS C:\bbndk\host_10_0_9_284\win32\x86\usr\bin
QT_HOST_DATA C:\bbndk\target_10_0_9_1101\qnx6\usr\share\qt4
QT_HOST_PREFIX C:\bbndk
QT_INSTALL_BINS C:\bbndk\host_10_0_9_284\win32\x86\usr\bin
QT_INSTALL_CONFIGURATION C:\bbndk
QT_INSTALL_DATA C:\bbndk\target_10_0_9_1101\qnx6\usr\share\qt4
QT_INSTALL_DEMOS C:\bbndk
QT_INSTALL_DOCS C:\bbndk\doc
QT_INSTALL_EXAMPLES C:\bbndk
QT_INSTALL_HEADERS C:\bbndk\target_10_0_9_1101\qnx6\usr\include\qt4
QT_INSTALL_IMPORTS C:\bbndk\target_10_0_9_1101\qnx6\x86\usr\lib\qt4\imports
QT_INSTALL_LIBS C:\bbndk\target_10_0_9_1101\qnx6\x86\usr\lib\qt4\lib
QT_INSTALL_PLUGINS C:\bbndk\target_10_0_9_1101\qnx6\x86\usr\lib\qt4\plugins
QT_INSTALL_PREFIX C:\bbndk
QT_INSTALL_TRANSLATIONS C:\bbndk\translations
QT_VERSION 4.8.4

 

Then I have a kit

 

Name: BB10 Simulator
Device type: BlackBerry Device
Device: BlackBerry 10 Simulator
Sysroot: C:\bbndk\target_10_0_9_1101\qnx6\x86
Compiler: BB10 QCC (x86)
Debugger: GDB Engine using "C:\bbndk\host_10_0_9_284\win32\x86\usr\bin\ntox86-gdb.exe"
Qt version: Qt 4.8.4 (System)
Qt mkspec:

 

 

And I also have a BlackBerry Device as Simulator.

 

 

Contributor
rocjohn
Posts: 24
Registered: ‎12-02-2012
My Device: BB10

Re: NDK Beta 4 + Simulator + Qt Creator 2.6 - problem

I faced the same problem!

New Contributor
ahtram
Posts: 4
Registered: ‎12-10-2012
My Device: BB10

Re: NDK Beta 4 + Simulator + Qt Creator 2.6 - problem

[ Edited ]

same here.

btw, I'm using a mac.

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

Re: NDK Beta 4 + Simulator + Qt Creator 2.6 - problem

If you are building/deploying the app for Simulator then target platform should be x86 not ARM.

New Contributor
ahtram
Posts: 4
Registered: ‎12-10-2012
My Device: BB10

Re: NDK Beta 4 + Simulator + Qt Creator 2.6 - problem

Alright, this works for me: 

http://qt-project.org/forums/viewthread/22541

see the last reply

Developer
Zingam
Posts: 195
Registered: ‎05-09-2012
My Device: Playbook, Z10 LE

Re: NDK Beta 4 + Simulator + Qt Creator 2.6 - problem

[ Edited ]

Adding:

C:\bbndk\target_10_0_9_1101\qnx6\usr\share\qt4\mkspecs\blackberry-x86-qcc

 to Qt mkspec...

 

Yeah, finally it works... sortof. Although it displays the warning sign next to the Kit with error message: Mkspec not found for Qt version which may eventually prevent the BB10 templates from showing up in the Qt Creator. And

 

QMAKE_CXXFLAGS += -Wc,-std=c++0x

 causes compilation errors.

 

Also the debugger behaves erraticly, it keeps on crashing and crashing.... Does your debugger work? I guess I should be using ntox86-gdb.exe

 

Thank you so much :smileyhappy: