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
Retired
Posts: 35
Registered: ‎10-15-2013
My Device: BlackBerry Z30
My Carrier: O2 UK

Porting libraries - ZeroMQ

Library name: libzmq

Website: http://www.zeromq.org/

Source code: https://github.com/zeromq/libzmq.git

Version ported: 4.1.0

Build system: autotools

 

First, make sure your environment is configured for command line development, and that you have autotools installed.

 

Creating the configure script

When you first clone the source repo you'll need to run: 

 

./autogen.sh

This creates the the configure script. 

 

Configuring for QNX ARM (for devices)

 

./configure --host=arm-unknown-nto-qnx8.0.0eabi --prefix=`pwd`/build/arm-qnx

 

Configuring for QNX x86 (for simulator)

 

./configure --host=i486-pc-nto-qnx8.0.0 --prefix=`pwd`/build/x86-qnx

 

Building

 

make -j8
make install

Note: the -j flag simply specifies the number of cores I want to use during compilation. It can dramatically decrease build times.

 

Output

Because I used the --prefix flag the library and header files will be installed under build/<qnx_variant>

Developer
Posts: 368
Registered: ‎06-30-2012
My Device: Playbook, Z10LE, DevAlpha C
My Carrier: Telenor, Mobitel

Re: Porting libraries - ZeroMQ

This kind of threads are very usefull to us developers, thanks man.

Highlighted
New Contributor
Posts: 4
Registered: ‎08-30-2013
My Device: Blackberry B10
My Carrier: Three

Re: Porting libraries - ZeroMQ

This works well on Core Native but it gives link error when used in Cascade. The actual problem is ZeroMQ needs to be linked with -lstdc++ while compiling if it is to be used with C++ examples. stdc++ seems to be not fully supported in cascades and hence gives error. I found the solution to this error which is to compile ZeroMQ by configuring as below.


For e.g. to compile ZeroMQ for a Blackberry 10 device, it needs to be
configured as following.

 ./configure \
    --host=arm-unknown-nto-qnx8.0.0eabi \
    --prefix=${QNX_TARGET}/armle-v7/usr \
    CC="qcc -V4.6.3,gcc_ntoarmv7le -lang-c++" \
    CXX="QCC -V4.6.3,gcc_ntoarmv7le -lang-c++" \
    LDFLAGS=-Wl,--no-undefined \
    LIBS="-lcpp"

Regards
Jiva