Conflict between fio.h and stdio.h (IAR)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Conflict between fio.h and stdio.h (IAR)

Jump to solution
1,435 Views
razed11
Contributor V

If I include <stdio.h> and <fio.h> I get the error below. I'm using IAR and C++.

Error[Pe147]: declaration is incompatible with "extern "C" __interwork __softfp char *_io_fgets(char *, int32_t, mqx_file *)" (declared at line 189 of Freescale\Freescale_MQX_4_1/lib/frdmk64f.iar/debug/psp\fio.h") "C:\ C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\inc\c\stdio.h 181

stdio.h defines:

__EFF_NR1    __ATTRIBUTES char * gets(char *);

and fio.h:

extern char       *_io_fgets(char *, _mqx_int, MQX_FILE_PTR);

Any advice on getting these to play well together?

Thanks,

Kenny

1 Solution
913 Views
danielchen
NXP TechSupport
NXP TechSupport

The problem is that MQX already implements it's own  _io_fgets.  I think you can use MQX function, and not touch stdio.h to avoid conflict.


Have a great day,
Daniel

View solution in original post

1 Reply
914 Views
danielchen
NXP TechSupport
NXP TechSupport

The problem is that MQX already implements it's own  _io_fgets.  I think you can use MQX function, and not touch stdio.h to avoid conflict.


Have a great day,
Daniel