AnsweredAssumed Answered

Error: cstdio cannot convert 'MQX_FILE_PTR {aka mqx_file*}' to 'std::FILE* {aka std::_FILE*}'

Question asked by Lars Wallden on Jan 7, 2016
Latest reply on Jan 12, 2016 by soledad

Hi,

 

I have started to receive an error I am not sure how to fix. This seems to be related to the library EWL and linking of the project.

I am using: CodeWarrior for MCU   Version: 10.6.4   Build Id:150416.

Target processor Kinetis MK21FN1M0VMC12

 

The project has compiled well but now I started to get this error message, no changes to the source code has been made. It must have to do with the build settings as I can understand.

 

The console message is:

In file included from C:/Freescale/CW MCU v10.6.4/MCU/ARM_GCC_Support/ewl/EWL_C++/include/lib_ewl_c++.prefix:12:0,

                 from <command-line>:0:

C:/Freescale/CW MCU v10.6.4/MCU/ARM_GCC_Support/ewl/EWL_C/include/lib_ewl.prefix:16:0: warning: "_EWL_C99" redefined [enabled by default]

C:/Freescale/Freescale_MQX_4_2/lib/NS_READER.cw10gcc/debug/bsp/NS_Reader.h:126:7: warning: #warning Flexbus is sharing pin with SPI0 moudle, hence enabling SPI0 that cause some demo use flexbus (mfs_ramdisk) do not run properly [-Wcpp]

C:/Freescale/CW MCU v10.6.4/MCU/ARM_GCC_Support/ewl/EWL_C/include/cstdio: In function 'int std::getchar()':

C:/Freescale/CW MCU v10.6.4/MCU/ARM_GCC_Support/ewl/EWL_C/include/cstdio:1116:22: error: cannot convert 'MQX_FILE_PTR {aka mqx_file*}' to 'std::FILE* {aka std::_FILE*}' for argument '1' to 'int std::getc(std::FILE*)'

C:/Freescale/CW MCU v10.6.4/MCU/ARM_GCC_Support/ewl/EWL_C/include/cstdio: In function 'int std::putchar(int)':

C:/Freescale/CW MCU v10.6.4/MCU/ARM_GCC_Support/ewl/EWL_C/include/cstdio:1123:26: error: cannot convert 'MQX_FILE_PTR {aka mqx_file*}' to 'std::FILE* {aka std::_FILE*}' for argument '2' to 'int std::putc(int, std::FILE*)'

C:/Freescale/CW MCU v10.6.4/MCU/ARM_GCC_Support/ewl/EWL_C/include/cstdio: In function 'int std::getchar()':

C:/Freescale/CW MCU v10.6.4/MCU/ARM_GCC_Support/ewl/EWL_C/include/cstdio:1116:22: error: cannot convert 'MQX_FILE_PTR {aka mqx_file*}' to 'std::FILE* {aka std::_FILE*}' for argument '1' to 'int std::getc(std::FILE*)'

C:/Freescale/CW MCU v10.6.4/MCU/ARM_GCC_Support/ewl/EWL_C/include/cstdio: In function 'int std::putchar(int)':

C:/Freescale/CW MCU v10.6.4/MCU/ARM_GCC_Support/ewl/EWL_C/include/cstdio:1123:26: error: cannot convert 'MQX_FILE_PTR {aka mqx_file*}' to 'std::FILE* {aka std::_FILE*}' for argument '2' to 'int std::putc(int, std::FILE*)'

C:/Freescale/CW MCU v10.6.4/MCU/ARM_GCC_Support/ewl/EWL_C/include/cstdio: In function 'int std::getchar()':

C:/Freescale/CW MCU v10.6.4/MCU/ARM_GCC_Support/ewl/EWL_C/include/cstdio:1116:22: error: cannot convert 'MQX_FILE_PTR {aka mqx_file*}' to 'std::FILE* {aka std::_FILE*}' for argument '1' to 'int std::getc(std::FILE*)'

C:/Freescale/CW MCU v10.6.4/MCU/ARM_GCC_Support/ewl/EWL_C/include/cstdio: In function 'int std::putchar(int)':

C:/Freescale/CW MCU v10.6.4/MCU/ARM_GCC_Support/ewl/EWL_C/include/cstdio:1123:26: error: cannot convert 'MQX_FILE_PTR {aka mqx_file*}' to 'std::FILE* {aka std::_FILE*}' for argument '2' to 'int std::putc(int, std::FILE*)'

C:/Freescale/CW MCU v10.6.4/MCU/ARM_GCC_Support/ewl/EWL_C/include/cstdio: In function 'int std::getchar()':

C:/Freescale/CW MCU v10.6.4/MCU/ARM_GCC_Support/ewl/EWL_C/include/cstdio:1116:22: error: cannot convert 'MQX_FILE_PTR {aka mqx_file*}' to 'std::FILE* {aka std::_FILE*}' for argument '1' to 'int std::getc(std::FILE*)'

C:/Freescale/CW MCU v10.6.4/MCU/ARM_GCC_Support/ewl/EWL_C/include/cstdio: In function 'int std::putchar(int)':

C:/Freescale/CW MCU v10.6.4/MCU/ARM_GCC_Support/ewl/EWL_C/include/cstdio:1123:26: error: cannot convert 'MQX_FILE_PTR {aka mqx_file*}' to 'std::FILE* {aka std::_FILE*}' for argument '2' to 'int std::putc(int, std::FILE*)'

mingw32-make: *** [Sources/CMOS.o] Error 1

mingw32-make: *** Waiting for unfinished jobs....

mingw32-make: *** [Sources/NeuralNetwork.o] Error 1

mingw32-make: *** [Sources/RF.o] Error 1

mingw32-make: *** [Sources/App.o] Error 1

 

 

Any suggestions are much appreciated, thanks.

Outcomes