Please explain me where and How to write the commands $ export CPUVARDIR=armle-v7 $ source <path_to_ndk>/bbndk-env.sh inorder to set
-
Setting up BlackBerry 10 NDK Environment
Compared to Playbook, there is no need to make your own build of Qt when you use BlackBerry 10 NDK. A Qt version is included in the BlackBerry 10 NDK, DevAlpha devices and in the BlackBerry Dev Simulator. The only thing what you need is to specify appropriate mkspec in qmake when you switch targets. It is still possible to build and use your own version of Qt if needed.
Some extra steps are required before you can start using the NDK Beta 4 with QtCreator. Most of them will not be needed in the future versions.
The BlackBerry 10 NDK is using a set of environment variables. Those variable are used by the “qt.conf” to set the values of defining Qt installation paths. In order to properly use Qt in the NDK, you need to set those environment variables first by sourcing the “bbndk-env.sh” script (or execute the “.bat” script under Windows) available in the NDK directory. In the current NDK Beta 4 you also have to set the “CPUVARDIR” variable, otherwise QtCreator will not find a valid Qt version. $ export CPUVARDIR=armle-v7 $ source <path_to_ndk>/bbndk-env.sh
Now the necessary environment variables are set. “qmake” should point to your NDK Qt version and you can start QtCreator in the same shell:
$ qmake -v QMake version 2.01a Using Qt version 4.8.4 in <path_to_ndk>/target<version>/qnx6/usr/lib/qt4/lib $ <path_to_qtcreator>/qtcreator Optionally, you can also avoid sourcing this script each time you use Qt on BlackBerry 10 by setting paths in the “qt.conf” file according the location of the NDK on your machine. Open “<path_to_ndk>/host<version>/<platform>/x86/usr/bin/qt.conf” and replace the values from QNX environment variables with the full path for the following entries: Binaries = <path_to_ndk>/host<version>/<platform>/x86/usr/bin Headers = <path_to_ndk>/target<version>/qnx6/usr/include/qt4 Data = <path_to_ndk>/target<version>/qnx6/usr/share/qt4 Libraries = <path_to_ndk>/target<version>/qnx6/armle-v7/usr/lib/qt4/lib Imports = <path_to_ndk>/target<version>/qnx6/armle-v7/usr/lib/qt4/imports Plugins = <path_to_ndk>/target<version>/qnx6/armle-v7/usr/lib/qt4/plugins
Note: in the next NDK releases those issues should be fixed so you won’t need to go through those steps to set up your Qt correctly.
-
On Windows you have to use the commandline (cmd) and on Linux a terminal/shell.
With the latest Gold release there is no need to set the CPUVARDIR manually anymore.
Just execute the bbndk-env.bat or bbndk-env.sh script in your bbndk directory. -
This is my .bat file (on Windows):
@REM This script sets environment variables required for this version of NDK
REM from the command line.
REM bbndk-env.bat
REMset 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\me\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\x86REM set CPUVARDIR=armle-v7
set CPUVARDIR=x86C:\bbndk\host_10_0_9_284\win32\x86\usr\bin\qmake -v
REM C:\Qt\qtcreator-2.6.0\bin\qtcreator.exe
C:\Qt\Qt5.0.0-rc1\Tools\QtCreator\bin\qtcreator.exe
@ -
Hi Zingam,
that's not the latest NDK. Please go to http://developer.blackberry.com/native/ and download the latest Gold Native SDK.
Afterwards follow the steps "here":https://qt-project.org/wiki/Qt-Creator-with-BlackBerry-10
My .bat file on Windows with the Gold NDK looks like this:
@
REM This script sets environment variables required for this version of NDK
REM from the command line.
REM bbndk-env.bat
REMset QNX_TARGET=<path_to_ndk>/target_10_0_9_1673/qnx6
set QNX_HOST=<path_to_ndk>/host_10_0_9_404/win32/x86
set QNX_CONFIGURATION=C:\Users<user>\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:\Users<user>\bbndk\ide\win32\x86\eclipse\jre\bin;%PATH%
set PYTHONPATH=
set QDE=<path_to_ndk>\ide\win32\x86
set CPUVARDIR=armle-v7
@ -
Well I have the same question. I think due to this I am unable to build any BB 10 Qt project and getting below error.
Anybody knows how to solve this issue? cant develop becuz of this.
Build Error: Symbolic links not supported: disabling -L.
Compile Output:
00:17:02: Running steps for project untitled25...
00:17:03: Starting: "G:\bbndk\host_10_0_9_404\win32\x86\usr\bin\qmake.exe" C:\QtSDK\Workspace\untitled25\untitled25.pro -r -spec default "CONFIG+=debug" "CONFIG+=declarative_debug"
00:17:03: The process "G:\bbndk\host_10_0_9_404\win32\x86\usr\bin\qmake.exe" exited normally.
00:17:03: Starting: "G:\bbndk\host_10_0_9_404\win32\x86\usr\bin\make.exe"
make: Symbolic links not supported: disabling -L.
qcc -Vgcc_ntoarmv7le -c -Wno-psabi -lang-c++ -fstack-protector-strong -mcpu=cortex-a9 -g -Wall -W -D_REENTRANT -DQT_NO_IMPORT_QT47_QML -DQ_OS_BLACKBERRY -DQT_DECLARATIVE_DEBUG -DQT_DECLARATIVE_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/share/qt4/mkspecs/default -I../untitled25 -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include/qt4/QtCore -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include/qt4/QtGui -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include/qt4/QtDeclarative -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include/qt4 -I../untitled25/qmlapplicationviewer -I. -I../untitled25 -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include/freetype2 -I. -o qmlapplicationviewer.o ../untitled25/qmlapplicationviewer/qmlapplicationviewer.cpp
qcc -Vgcc_ntoarmv7le -c -Wno-psabi -lang-c++ -fstack-protector-strong -mcpu=cortex-a9 -g -Wall -W -D_REENTRANT -DQT_NO_IMPORT_QT47_QML -DQ_OS_BLACKBERRY -DQT_DECLARATIVE_DEBUG -DQT_DECLARATIVE_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/share/qt4/mkspecs/default -I../untitled25 -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include/qt4/QtCore -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include/qt4/QtGui -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include/qt4/QtDeclarative -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include/qt4 -I../untitled25/qmlapplicationviewer -I. -I../untitled25 -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include/freetype2 -I. -o main.o ../untitled25/main.cpp
G:/bbndk/host_10_0_9_404/win32/x86/usr/bin/moc.exe -DQT_NO_IMPORT_QT47_QML -DQ_OS_BLACKBERRY -DQT_DECLARATIVE_DEBUG -DQT_DECLARATIVE_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/share/qt4/mkspecs/default -I../untitled25 -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include/qt4/QtCore -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include/qt4/QtGui -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include/qt4/QtDeclarative -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include/qt4 -I../untitled25/qmlapplicationviewer -I. -I../untitled25 -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include/freetype2 -I. -D__QNXNTO__ ../untitled25/qmlapplicationviewer/qmlapplicationviewer.h -o moc_qmlapplicationviewer.cpp
qcc -Vgcc_ntoarmv7le -c -Wno-psabi -lang-c++ -fstack-protector-strong -mcpu=cortex-a9 -g -Wall -W -D_REENTRANT -DQT_NO_IMPORT_QT47_QML -DQ_OS_BLACKBERRY -DQT_DECLARATIVE_DEBUG -DQT_DECLARATIVE_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/share/qt4/mkspecs/default -I../untitled25 -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include/qt4/QtCore -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include/qt4/QtGui -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include/qt4/QtDeclarative -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include/qt4 -I../untitled25/qmlapplicationviewer -I. -I../untitled25 -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include -Ig:/bbndk/target_10_0_9_1673/qnx6/usr/include/freetype2 -I. -o moc_qmlapplicationviewer.o moc_qmlapplicationviewer.cpp
qcc -Vgcc_ntoarmv7le -lang-c++ -Wl,-rpath-link,G:/bbndk/target_10_0_9_1673/qnx6/armle-v7/lib -Wl,-rpath-link,G:/bbndk/target_10_0_9_1673/qnx6/armle-v7/usr/lib -o untitled25 qmlapplicationviewer.o main.o moc_qmlapplicationviewer.o -LG:/bbndk/target_10_0_9_1673/qnx6/armle-v7/lib -LG:/bbndk/target_10_0_9_1673/qnx6/armle-v7/usr/lib -LG:/bbndk/target_10_0_9_1673/qnx6/armle-v7/usr/lib/qt4/lib -LG:/bbndk/target_10_0_9_1673/qnx6/x86/usr/lib/qt4/lib -lQtDeclarative -lQtScript -lQtSvg -lQtSql -lsqlite3 -lz -lQtXmlPatterns -lQtNetwork -lsocket -lQtGui -lQtCore -lm -lbps
00:17:16: The process "G:\bbndk\host_10_0_9_404\win32\x86\usr\bin\make.exe" exited normally.