Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Annoying QCC problem (QNX 6.4.1): (6 Items)
   
Annoying QCC problem (QNX 6.4.1)  
Hello,

I have ported the lib udt (UDP communication). No compile or link problems.
But ... the code doesn't work!  No problems with Linux and Windows!!

The example application  "appserver"  (in dir app) has problems in the bind call and crashes wthin an error message by 
executing of an cout statement =:-/

The ported code of this small lib project is in the attachment ...

What's the problem with QCC ??

--Armin 
Attachment: Text udt4-qnx6.4.1.tar.gz 112.65 KB
Re: Annoying QCC problem (QNX 6.4.1)  
On 10-05-16 03:52 PM, Armin Steinhoff wrote:
>
> Hello,
>
> I have ported the lib udt (UDP communication). No compile or link problems.
> But ... the code doesn't work!  No problems with Linux and Windows!!
>
> The example application  "appserver"  (in dir app) has problems in the bind call and crashes wthin an error message by
 executing of an cout statement =:-/
>
> The ported code of this small lib project is in the attachment ...
>
> What's the problem with QCC ??

You're linking against both the Dinkumware C++ library and the GNU C++ 
library.

QCC -Wall -DLINUX -I../src -g -finline-functions -DIA32  appserver.cpp -c
QCC appserver.o -o appserver -L../src -ludt -lstdc++ -lcpp -lcxa -lm 
-lsocket

Remove -lstdc++ and it no longer crashes..

Regards,

Ryan Mansfield
Re: Annoying QCC problem (QNX 6.4.1)  
Ryan,

many thanks!  It doesn't crash and now and I see the error message below 
after starting  appserver 1024:

bind: Connection setup failure: unable to create/configure UDP socket: 
No buffer space available.

I will switch to the networking forums ...

Where can I find detailed information about how to link a C++ application ??

Cheers

--Armin




Ryan Mansfield wrote:
> On 10-05-16 03:52 PM, Armin Steinhoff wrote:
>   
>> Hello,
>>
>> I have ported the lib udt (UDP communication). No compile or link problems.
>> But ... the code doesn't work!  No problems with Linux and Windows!!
>>
>> The example application  "appserver"  (in dir app) has problems in the bind call and crashes wthin an error message 
by executing of an cout statement =:-/
>>
>> The ported code of this small lib project is in the attachment ...
>>
>> What's the problem with QCC ??
>>     
>
> You're linking against both the Dinkumware C++ library and the GNU C++ 
> library.
>
> QCC -Wall -DLINUX -I../src -g -finline-functions -DIA32  appserver.cpp -c
> QCC appserver.o -o appserver -L../src -ludt -lstdc++ -lcpp -lcxa -lm 
> -lsocket
>
> Remove -lstdc++ and it no longer crashes..
>
> Regards,
>
> Ryan Mansfield
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post54801
>
>
>   

Re: Annoying QCC problem (QNX 6.4.1)  
On 10-05-16 04:52 PM, Armin Steinhoff wrote:
>
> Ryan,
>
> many thanks!  It doesn't crash and now and I see the error message below
> after starting  appserver 1024:
>
> bind: Connection setup failure: unable to create/configure UDP socket:
> No buffer space available.
>
> I will switch to the networking forums ...
>
> Where can I find detailed information about how to link a C++ application ??

The QCC docs have information on selecting the C++ library variant. See 
the -Y <lib variant> option here:

http://www.qnx.com/developers/docs/6.4.1/neutrino/utilities/q/qcc.html

Regards,

Ryan Mansfield
Re: Annoying QCC problem (QNX 6.4.1)  
Ryan,

and what libs must be used when I link a plain C apps with qcc against a 
C++ lib?
I'm using -lcpp and -lcxa. Do I miss something ?

Regards

--Armin



Ryan Mansfield wrote:
> On 10-05-16 04:52 PM, Armin Steinhoff wrote:
>   
>> Ryan,
>>
>> many thanks!  It doesn't crash and now and I see the error message below
>> after starting  appserver 1024:
>>
>> bind: Connection setup failure: unable to create/configure UDP socket:
>> No buffer space available.
>>
>> I will switch to the networking forums ...
>>
>> Where can I find detailed information about how to link a C++ application ??
>>     
>
> The QCC docs have information on selecting the C++ library variant. See 
> the -Y <lib variant> option here:
>
> http://www.qnx.com/developers/docs/6.4.1/neutrino/utilities/q/qcc.html
>
> Regards,
>
> Ryan Mansfield
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post54804
>
>
>   

Re: Annoying QCC problem (QNX 6.4.1)  
On 10-05-16 05:20 PM, Armin Steinhoff wrote:
> Ryan,
>
> and what libs must be used when I link a plain C apps with qcc against a
> C++ lib?
> I'm using -lcpp and -lcxa. Do I miss something ?

Nope those are the two libraries you need to link against. You can also 
use the QCC driver to link your app and QCC will implicitly specify 
-lcpp -lcxa (or the other C++ library variant based on the -Y option)

e.g.

qcc foo.c -c
QCC foo.o <some C++ libs>

Regards,

Ryan Mansfield

> Ryan Mansfield wrote:
>> On 10-05-16 04:52 PM, Armin Steinhoff wrote:
>>
>>> Ryan,
>>>
>>> many thanks!  It doesn't crash and now and I see the error message below
>>> after starting  appserver 1024:
>>>
>>> bind: Connection setup failure: unable to create/configure UDP socket:
>>> No buffer space available.
>>>
>>> I will switch to the networking forums ...
>>>
>>> Where can I find detailed information about how to link a C++ application ??
>>>
>>
>> The QCC docs have information on selecting the C++ library variant. See
>> the -Y<lib variant>  option here:
>>
>> http://www.qnx.com/developers/docs/6.4.1/neutrino/utilities/q/qcc.html
>>
>> Regards,
>>
>> Ryan Mansfield
>>
>>
>>
>> _______________________________________________
>>
>> General
>> http://community.qnx.com/sf/go/post54804
>>
>>
>>
>
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post54806
>