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
Posts: 114
Registered: ‎08-09-2010
My Device: Tour
My Carrier: Bell
Accepted Solution

Installing QT in the QNX IDE

Any quick tips on getting QT up and running inside the NDK IDE?

 

I've downloaded and unzipped RIM's QT port from github. In the abscnce of any other guidelines, I tried running the ./configure script. It fails with

 

Basic XLib functionality test failed!
 You might need to modify the include and library search paths by editing
 QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 [unzipped directory]/mkspecs/linux-g++-64.

 

Indeed, those 2 settings in that file are pointing to a non-existant directory under /usr

 

QMAKE_LIBDIR_X11      = /usr/X11R6/lib64
QMAKE_LIBDIR_OPENGL   = /usr/X11R6/lib64

 

I don't have X11R6, or any other X11 variation under /usr. This is a 64-bit Ubuntu 11.04 system.

 

What am I missing? A prerequisite? I'm not a library or X11 wizard.

 

Developer
Posts: 114
Registered: ‎08-09-2010
My Device: Tour
My Carrier: Bell

Re: Installing QT in the QNX IDE

So the correct script is apparently configure-qsk, which sets up some NDK-specific stuff, then calls the more generic configure with a list of parameters determined by the qsk script.

 

And running the bbndk-env.sh script in the root of the NDK installation appears to set up some environment variables needed by the configure script.

 

I have ended up running

 

          ./configure-qsk arm v7le

 

and it still fails:

 

The OpenGL ES 2.0 functionality test failed!
 You might need to modify the include and library search paths by editing
 QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in
 /[path to QT]/mkspecs/unsupported/blackberry-armv7le-g++.

 

It seems to want pointers to where it would find includes and libs for opengl, which presumably would be under the target directory of the NDK installation, but nothing in that directory structure jumps up and says "pick me!"

 

 

Developer
Posts: 114
Registered: ‎08-09-2010
My Device: Tour
My Carrier: Bell

Re: Installing QT in the QNX IDE

From a late-night IRC chat session, one of the members posted a helpful how-to on building and using the Qt port recently made available (in early form) from RIM.

 

Qt for the BlackBerry PlayBook

 

I've been able to follow the procedure, making some adjustments for local paths along the way, and got the simple Hello World (Qt version) to deploy and run on my PlayBook. The procedure as described uses the command line to build the target app. I'm looking at the next steps to integrate building and deploying the app, from within the IDE.

 

This is enough to at least get us started with Qt on PlayBook...hopefully some more official guidance from RIM will be coming in the near future.

Contributor
Posts: 16
Registered: ‎10-21-2011
My Device: 8520
My Carrier: Orange

Re: Installing QT in the QNX IDE

[ Edited ]

Thnaks for the link.

 

I try to build QT on Windows 7 and I can't build it for the moment. But I found how to solve a lot of issues.

1. I launched bbndk-env.bat in MS-DOS console.

2. In the console I change the working directory to the QT source project folder and I ran bash.exe

3. ./configure-qsk arm v7le -> failed

4. I need to modify configure-qsk and add the following option to the ./configure command : -platform $USE_MKSPEC

5. ./configure-qsk arm v7le -> failed

6. I downloaded UnxUtils.zip and copied the binaries in <DRIVE>:\bbndk-1.0\host\win32\x86\usr\bin (but not which.exe)

7. ./configure-qsk arm v7le -> failed

 

At this point I need to install Perl on my computer in order to solve the last issue.

Contributor
Posts: 16
Registered: ‎10-21-2011
My Device: 8520
My Carrier: Orange

Re: Installing QT in the QNX IDE

Ok, Perl is now installed on my computer but I have new issues :

 

bash-3.1$ ./configure-qsk arm v7le
Staging directory could not be determined. Using: /g/QTSrc/stage/nto
Determining system architecture... (Workstation :version 6.1 Service Pack 1 (Bui
ld 7601) :Intel Pentium )
    Trying 'Intel Pentium '...
    'arm' is supported
    'Intel Pentium ' is unsupported, using 'generic'
System architecture: 'arm'
Host architecture: 'generic'
Precompiled-headers support disabled.
/g/QTSrc/config.tests/unix/fvisibility.test: line 28: $$QMAKE_CC -lang-c++: command not found
Symbol visibility control disabled.

This is the Qt Lighthouse Open Source Edition.

You are licensed to use this software under the terms of
the Lesser GNU General Public License (LGPL) versions 2.1.

You have already accepted the terms of the  license.

Creating qmake. Please wait...
ln: creating symbolic link `mkspecs/default' to `unsupported/blackberry-armv7le-g++': No such file or directory
$QMAKE_CC -lang-c++ -c -o project.o  -DQMAKE_OPENSOURCE_EDITION -g -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -Igenerators/integrity -I/g/QTSrc/include -I/g/QTSrc/include/QtCore -I/g/QTSrc/src/corelib/global -I/g/QTSrc/src/corelib/xml -I/g/QTSrc/tools/shared -DQT_NO_PCRE
 -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/g/QTSrc/mkspecs/unsupported/blackberry-armv7le-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DEPRECATED  project.cpp
C:/Users/Kevin/AppData/Local/Temp/make3396-1.sh: line 1: -lang-c++: command not found
make: *** [project.o] Error 127

 Any idea ?

New Contributor
Posts: 6
Registered: ‎10-25-2011
My Device: tablet
My Carrier: trcell

Re: Installing QT in the QNX IDE

Here is the way i used to compile the Qt project;

1.Add the following bold lines to the start of configure-qsk file;

#!/bin/bash

export QNX_TARGET="/opt/bbndk-1.0/target/qnx6"

export QNX_HOST="/opt/bbndk-1.0/host/linux/x86"
PATH="$QNX_HOST/usr/bin:$PATH"
export PATH


2. Change your qmake.conf with using following lines;(the qmake.conf located at /[path to QT]/mkspecs/unsupported/blackberry-armv7le-g++. )

 

QMAKE_INCDIR = /opt/bbndk-1.0/target/qnx6/usr/include
QMAKE_LIBDIR = /opt/bbndk-1.0/target/qnx6/armle-v7/usr/lib \
/opt/bbndk-1.0/target/qnx6/armle-v7/lib

QMAKE_INCDIR_OPENGL_ES2 = /opt/bbndk-1.0/target/qnx6/usr/include
QMAKE_LIBDIR_OPENGL_ES2 = /opt/bbndk-1.0/target/qnx6/armle-v7/usr/lib
QMAKE_LIBS_OPENGL_ES2 = -lGLESv2

 

3. Run  following commands to end-up qt build

     -  ./configure-qsk arm v7le

     -   make

     -   make install (qt will be installed to [path to QT]/stage folder)

 

 

 

Nurhat


New Contributor
Posts: 6
Registered: ‎10-25-2011
My Device: tablet
My Carrier: trcell

Re: Installing QT in the QNX IDE

Now, i am struggling integration of the qt build with QNX IDE. So, i don't know how to run the compiled qt application on the tablet device. If you find any solution, please let me know.
BlackBerry Development Advisor
Posts: 417
Registered: ‎10-27-2010
My Device: PlayBook

Re: Installing QT in the QNX IDE

Create BBT C/C++ project. Select C++. Select Makefile -> Empty project.

In project properties instead of running make select to run your build system (qmake or whatever qt need to run

to build)

When binary is build IDE would find it and display in Binaries folder (or you build from command line you need to Refresh the project in IDE)

After that just right click on Binary and select Run As..-> BBT C/C++ Application

New Contributor
Posts: 6
Registered: ‎10-25-2011
My Device: tablet
My Carrier: trcell

Re: Installing QT in the QNX IDE

Thanks to nrtalle who shared the following tutorial written by hecgeek  with me , it made my life easier. 

 

http://hecgeek.blogspot.com/2011/10/qt-for-blackberry-playbook.html

Contributor
Posts: 16
Registered: ‎10-21-2011
My Device: 8520
My Carrier: Orange

Re: Installing QT in the QNX IDE

Does anyone have build this QT on Windows ?