Rodney Dowdall(deleted)
|
Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
|
Rodney Dowdall(deleted)
06/19/2015 1:37 PM
post113984
|
Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
Hello
I am trying to build something using the "4.8.3,gcc_ntox86_cpp-ne" variant, but when a header file tries to include the
array include file it says that it can't find it. Here is my compile line minus project specific defines:
home/rodney/tools/qnx650/host/linux/x86/usr/bin/qcc -lang-c++ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D__QNXNTO__
-V4.8.3,gcc_ntox86_cpp-ne -Wc,-std=c++0x -lang-c++ -fno-rtti -Wformat -Wformat-security -Werror=format-security -Wl,--
no-keep-memory -Wc,-std=c++11 -fno-exceptions -fno-strict-aliasing -fno-rtti -Wall -Wextra -Wcast-align -Wformat-
security -Wmissing-format-attribute -Wpointer-arith -Wundef -Wwrite-strings -fPIC
The error I get is:
fatal error: array: No such file or directory
#include <array>
Thanks,
Rodney
|
|
|
Ryan Mansfield(deleted)
|
Re: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
|
Ryan Mansfield(deleted)
06/19/2015 1:44 PM
post113985
|
Re: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
<array> was only added in C++11, and the Dinkumware C++ library that
shipped with QNX 6.5.0 in 2010 was C++98. It's available in the GNU
libstdc++ in 6.5.0 as part of the experimental C++0x support.
Regards,
Ryan Mansfield
|
|
|
Rodney Dowdall(deleted)
|
Re: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
|
Rodney Dowdall(deleted)
06/19/2015 1:48 PM
post113986
|
Re: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
> <array> was only added in C++11, and the Dinkumware C++ library that
> shipped with QNX 6.5.0 in 2010 was C++98. It's available in the GNU
> libstdc++ in 6.5.0 as part of the experimental C++0x support.
>
> Regards,
>
> Ryan Mansfield
So when I download the updates (i.e.: linux-gcc-4.8.3-qnx65x.tar.gz) from Foundary, that doesn't include updated Dinkum
libraries? Does the "-Wc,-std=c++0x" not turn on that C++0x support? Or is it a different option?
|
|
|
Ryan Mansfield(deleted)
|
Re: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
|
Ryan Mansfield(deleted)
06/19/2015 1:51 PM
post113987
|
Re: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
On 15-06-19 01:48 PM, Rodney Dowdall wrote:
>> <array> was only added in C++11, and the Dinkumware C++ library that
>> shipped with QNX 6.5.0 in 2010 was C++98. It's available in the GNU
>> libstdc++ in 6.5.0 as part of the experimental C++0x support.
>>
>> Regards,
>>
>> Ryan Mansfield
>
> So when I download the updates (i.e.: linux-gcc-4.8.3-qnx65x.tar.gz) from Foundary, that doesn't include updated
Dinkum libraries? Does the "-Wc,-std=c++0x" not turn on that C++0x support? Or is it a different option?
Only the GNU libstdc++ updates are packaged with gcc packages on
foundry27. -Wc,-std=c++0x turns on the core language level but doesn't
add support in the C++ STL headers.
Regards,
Ryan Mansfield
|
|
|
Rodney Dowdall(deleted)
|
Re: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
|
Rodney Dowdall(deleted)
06/19/2015 2:23 PM
post113988
|
Re: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
So if I add the following to my command line:
-I $QNX_TARGET/qnx6/usr/include/c++/4.8.3/ -I $QNX_TARGET/target/qnx6/usr/include/c++/4.8.3/i486-pc-nto-qnx6.5.0/
then things compile. But that seems oh so very wrong.
Thanks,
Rodney
|
|
|
Mario Charest
|
RE: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
|
Mario Charest
06/19/2015 2:24 PM
post113989
|
RE: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
You need to switch to gnu C++ lib. Otherwise chaos will ensue.
-----Message d'origine-----
De : Rodney Dowdall [mailto:community-noreply@qnx.com]
Envoyé : 19 juin 2015 14:23
À : general-toolchain
Objet : Re: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
So if I add the following to my command line:
-I $QNX_TARGET/qnx6/usr/include/c++/4.8.3/ -I $QNX_TARGET/target/qnx6/usr/include/c++/4.8.3/i486-pc-nto-qnx6.5.0/
then things compile. But that seems oh so very wrong.
Thanks,
Rodney
_______________________________________________
General
http://community.qnx.com/sf/go/post113988
To cancel your subscription to this discussion, please e-mail general-toolchain-unsubscribe@community.qnx.com
|
|
|
Rodney Dowdall(deleted)
|
Re: RE: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
|
Rodney Dowdall(deleted)
06/19/2015 2:26 PM
post113990
|
Re: RE: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
> You need to switch to gnu C++ lib. Otherwise chaos will ensue.
>
> -----Message d'origine-----
> De : Rodney Dowdall [mailto:community-noreply@qnx.com]
> Envoyé : 19 juin 2015 14:23
> À : general-toolchain
> Objet : Re: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne"
> variant
>
> So if I add the following to my command line:
>
> -I $QNX_TARGET/qnx6/usr/include/c++/4.8.3/ -I $QNX_TARGET/target/qnx6/usr/
> include/c++/4.8.3/i486-pc-nto-qnx6.5.0/
>
> then things compile. But that seems oh so very wrong.
>
> Thanks,
> Rodney
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post113988
> To cancel your subscription to this discussion, please e-mail general-
> toolchain-unsubscribe@community.qnx.com
Thanks Mario, but if I switch to the GNU C++ lib then I can't disable exceptions. Also the GNU CPP lib only seems to be
available for x86.
I'll do the switch and compile for x86 for now.
|
|
|
Rodney Dowdall(deleted)
|
Re: RE: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
|
Rodney Dowdall(deleted)
06/19/2015 3:57 PM
post113991
|
Re: RE: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
I guess I was wrong about the gpp only being available for x86. Seems there is a variant for other targets as well.
I'll see what the exception enablement does to the code size.
However, how does one use math functions when using C++11? I have tried including cmath only and with math.h, and I
have tried different orders. I have tried undeffing the functions that I want to use, but to no avail. If I want to
use copysign in my code for example, how do I do it?
Calling std::copysign doesn't work, and neither does copysign.
Thanks,
Rodney
|
|
|
Rodney Dowdall(deleted)
|
Re: RE: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
|
Rodney Dowdall(deleted)
06/19/2015 7:20 PM
post113992
|
Re: RE: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
So it looks like the following define in yvals.h is getting missed:
#if defined(__GNUC__) && (2 <= __GNUC__) && (!__STRICT_ANSI__)
If I specify -Wc,-std=c++11 when I compile the attached test app then the compilation will fail. If I take out that -Wc
,-std=c++11 then we go in to that define in yvals.h and then the define #define _C99 1 happens and everything compiles.
So is _C99 supposed to be defined when you use -Wc,-std=c++11 or is there another problem?
Thanks,
Rodney
|
|
|
Ryan Mansfield(deleted)
|
Re: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
|
Ryan Mansfield(deleted)
06/19/2015 7:26 PM
post113993
|
Re: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
Use -std=gnu++0x or -std=gnu++11.
Regards,
Ryan Mansfield
Original Message
From: Rodney Dowdall
Sent: Friday, June 19, 2015 7:20 PM
To: general-toolchain
Reply To: general-toolchain@community.qnx.com
Subject: Re: RE: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
So it looks like the following define in yvals.h is getting missed:
#if defined(__GNUC__) && (2 <= __GNUC__) && (!__STRICT_ANSI__)
If I specify -Wc,-std=c++11 when I compile the attached test app then the compilation will fail. If I take out that -Wc
,-std=c++11 then we go in to that define in yvals.h and then the define #define _C99 1 happens and everything compiles.
So is _C99 supposed to be defined when you use -Wc,-std=c++11 or is there another problem?
Thanks,
Rodney
_______________________________________________
General
http://community.qnx.com/sf/go/post113992
To cancel your subscription to this discussion, please e-mail general-toolchain-unsubscribe@community.qnx.com
|
|
|
Rodney Dowdall(deleted)
|
Re: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
|
Rodney Dowdall(deleted)
06/19/2015 8:13 PM
post113995
|
Re: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
Thanks Ryan, that solved it.
|
|
|
Rodney Dowdall(deleted)
|
Re: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
|
Rodney Dowdall(deleted)
06/22/2015 9:13 AM
post114001
|
Re: Can't find array include when using "4.8.3,gcc_ntox86_cpp-ne" variant
So is there a way to turn off exceptions when using the -std=gnu++11 option? The -fno-exceptions causes a compilation
error in one of the standard header files.
Not a big deal if they can't be turned off. Just thought I would ask.
Thanks,
Rodney
|
|
|
|