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
Contributor
juergen0815
Posts: 30
Registered: ‎02-23-2012
My Device: PlayBook
My Carrier: Bell

Crash course for command line tools with NDK ?

Hi!

 

Can someone post (or point me to) a crashcourse how to use the Tablet NDK (2.0) in a comandline enviroment? It has been a while since I have used a cross compiler. Preferred OS is Windows7 and MinGW/Mingw-sys (any other environment would do - on a windows platform, please). 

 

No theoretical discussion please. Just a short example with e.g. SDL would do (./configure host=?? target=??), and if someone is around who can explain how to compile boost (1.42 or above) in a nutshell, I would appreciate it very much.

 

Thanks a lot

Jurgen

Please use plain text.
Contributor
juergen0815
Posts: 30
Registered: ‎02-23-2012
My Device: PlayBook
My Carrier: Bell

Re: Crash course for command line tools with NDK ?

To add a little bit for others to read. This is how you compile boost (1.42 - that's what I'm using in win/mac/linux).

 

I thought that might be helpful:

 

Set default compiler:

 

qcc -V4.4.2,gcc_ntoarmv7le_cpp -set-default

 

Compile:

 

bjam toolset=qcc link=static runtime-link=static target-os=qnxnto --stagedir=qnx --without-python --without-mpi threadapi=pthread

 

Using MinGW/Windows7 and the bbndk 2.0.3 Beta.

 

Please use plain text.
BlackBerry Development Advisor
anhu
Posts: 54
Registered: ‎10-26-2011
My Device: Playbook
My Carrier: Rogers

Re: Crash course for command line tools with NDK ?

Hi, 

 

Please have a look at the BlackBerry Profile on Github.  There  you can find our SDL port.  

 

We have setup the SDL port to build both with the IDE and via autotools on the command line on Ubuntu.  

 

You can look for build_for_playbook.sh in the root directory of the SDL port where we setup various environment variables and commands.  

 

In the test directory of the SDL port, you can find a script called deploy_to_playbook.sh.  

In there, you can see how we construct a bar file and the kind of commands that we use to deploy applications.  

You will need to add your own details such as address, password and tokens in the deployment script..  

 

Its important to source the bbndk-env.sh to make sure all your environment variables are setup correctly.  

 

 

 

Please use plain text.
BlackBerry Development Advisor
anhu
Posts: 54
Registered: ‎10-26-2011
My Device: Playbook
My Carrier: Rogers

Re: Crash course for command line tools with NDK ?

Also,

 

the following link is probably what you were looking for: 

https://bdsc.webapps.blackberry.com/native/documentation/porting_overview_1970891_11.html

Please use plain text.
Contributor
juergen0815
Posts: 30
Registered: ‎02-23-2012
My Device: PlayBook
My Carrier: Bell

Re: Crash course for command line tools with NDK ?

Thanks for the reply. It's not quite what I need, though. I eventually figured out how to compile SDL from the command line (btw. TouchControlOverlay dependency is fine, but that itself requires libpng and libxml2...not so great...).

 

Anyhow, I am more interested how to use a qcc cross compiler with a standard gnu makefile. E. G. Now that SDL is done, it would be nice to simply compile SDL_image and SDL_ttf, both which should do just fine on the playbook - the required libs are already there).

 

Well, for me, I don't really need SDL. It's just another "profile" I support. My engine core compiled just fine without.

Please use plain text.
BlackBerry Development Advisor
anhu
Posts: 54
Registered: ‎10-26-2011
My Device: Playbook
My Carrier: Rogers

Re: Crash course for command line tools with NDK ?

Hi, 

 

Yes, I meant to point you to the SDL port so that you could see the compiler flags, environment variable and other things in the shell script so that you could get an idea of how to setup your build scripts and makefiles.  

 

Sorry, I was not trying to push you to use SDL nor the autotools. 

 

 

 

 

 

Please use plain text.
Contributor
juergen0815
Posts: 30
Registered: ‎02-23-2012
My Device: PlayBook
My Carrier: Bell

Re: Crash course for command line tools with NDK ?

No, no. That's fine. I'll take a closer look into the SDL makefile as time permits. Thanks for your help.

Please use plain text.
Developer
falo
Posts: 97
Registered: ‎05-12-2009
My Device: PlayBook
My Carrier: 3

Re: Crash course for command line tools with NDK ?

Hi Juergen. Any chance you could expand on what you did to use Boost? I've just discovered it and wouldn't mind having a play but the blackberry github repo has been abandoned for a few months with no entries.
-------
You can find me (sporadically) writing and developing at http://floor4.co.uk and gaming at http://uk-tf.co.uk
My Apps: Flip!
Please use plain text.
Contributor
juergen0815
Posts: 30
Registered: ‎02-23-2012
My Device: PlayBook
My Carrier: Bell

Re: Crash course for command line tools with NDK ?

Yes, the github is empty. I am using an older boost bersion 1.42. The latest version 1.49 seems to have changed the way they build the libs now. The boost version I use is a stock version you can download from boost.org. Some things might not work (later version might have a better qnx adaption, bjam should work fine up to version 1.46 I guess).

 

Also, boost does not officially support MinGW,  however, this works just fine.

 

I am using a stock MinGW - ming-sys installation. In the MinGW console call

 

$ source [hour bbndk path]/bbndk-environment.sh

 

This will set all required environment variables in your shell. Make sure you have no windows style path names in the sh file (didn't work for me). "c:" is /c/ in MinGW (/cygdrive/c in cygwin).

 

Then proceed with what I described above. Ignore the warnings for now, some modules might not compile.I did not investigate because what I need works. That is thread, system, filesystem, date-time. (including. Mmap).

Please use plain text.
New Contributor
lemays
Posts: 2
Registered: ‎05-08-2012
My Device: Playbook
My Carrier: ATT

Re: Crash course for command line tools with NDK ?

Has anyone successfully compiled Boost 1.49 with QNX 6.5.0 SDK (qcc 4.4.2)?  I am not having the best success as the qcc.jam doesn't seem to work as expected.  It also produces .obj files instead of the anticipated .o.  I'm new to this so specific build steps or suggestions would be very helpful.

Please use plain text.