Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Compilation error with compiler option '-Wc,-std=c99': (4 Items)
   
Compilation error with compiler option '-Wc,-std=c99'  
When I use the compiler option '-Wc,-std=c99' I am getting the following errors ...

error: 'PROT_NOCACHE' undeclared (first use in this function)
error: (Each undeclared identifier is reported only once for each function it appears in.)
error: 'MAP_PHYS' undeclared (first use in this  function)
error: 'MAP_ANON' undeclared (first use in this  function)
error: 'NOFD' undeclared (first use in this fun ction)

Can I know why and how can I resolve the same ?
Re: Compilation error with compiler option '-Wc,-std=c99'  
On 11-02-14 08:45 AM, Girisha SG wrote:
> When I use the compiler option '-Wc,-std=c99' I am getting the following
> errors ...
>
> error: 'PROT_NOCACHE' undeclared (first use in this function)
> error: (Each undeclared identifier is reported only once for each
> function it appears in.)
> error: 'MAP_PHYS' undeclared (first use in this function)
> error: 'MAP_ANON' undeclared (first use in this function)
> error: 'NOFD' undeclared (first use in this fun ction)
>
> Can I know why and how can I resolve the same ?

-std=c99 defines __STRICT_ANSI__ which shuts off the __EXT_QNX 
extensions in the headers. You should be able to compile with 
-Wc,-std=gnu99.

Please avoid the multiple cross posts.

Regards,

Ryan Mansfield
Re: Compilation error with compiler option '-Wc,-std=c99'  
Thanks for the input however I am observing 'undefined reference to XYZ' for the function which is defined to be inline
Re: Compilation error with compiler option '-Wc,-std=c99'  
On 11-02-14 09:26 AM, Girisha SG wrote:
> Thanks for the input however I am observing 'undefined reference to XYZ'
> for the function which is defined to be inline

The errors you posted are only compiler errors, and not a single one of 
them is a linker error like an undefined reference. No one will be able 
to help you unless you accurately tell us the problem you're having.

Regards,

Ryan Mansfield