[zeromq-dev] Solving GNU stdc++ linker error on QNX platform

Jiva Bagale jnbagale at gmail.com
Fri Dec 6 15:07:23 CET 2013


Jiva Bagale <jnbagale <at> gmail.com> writes:

> 
> I am trying to create application using ZeroMQ 3.2.2 in QNX platform 
> used by Blackberry 10 OS.
> They have 2 different development routes called as Core native and 
> Cascade. Core native has
> good support for GNU stdc++ library so I can run ZeroMQ examples on 
> their Core Native platform.
> But I am trying to use Cascade which has strong GUI functions and it 
> does not seem to have good support
> for GNU stdc++ library. I am getting run time errors saying "undefined 
> reference to various functions".
> I have added -lstdc++ flags while compiling ZeroMQ library and also to 
> the ZeroMQ example.
> I contacted some blackberry developers regarding this but they were not 
> able to help me.
> 
> My query is: Will it be possible to recompile ZeroMQ with different 
> flags to avoid this issue?
> Hope it is not a dead end for me unless GNU stdc++ is not supported on 
> that platform.
> Also, I have seen --with-c or --with-cpp flags being used while 
> compiling ZeroMQ, Will they be of any help in this scenario?.
> 
> My actual usage scenario is: I have a C library which uses ZeroMQ functions.
> Now I am trying to create an C++ application which uses my C library by 
> doing extern "C" {include ...}
> The same setup of application works fine on their Core Native platform 
> but not on Cascade.
> 
> Many Thanks in advance
> Jiva Bagale
> 

I have solved the problem now. It was required to link against -lcpp instead
of -lstdc++. And also the default c++ compiler needed to be specified as
below while compiling ZeroMQ.

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





More information about the zeromq-dev mailing list