Hello,
I'm working in MCUXpresso IDE 11.0.
I'm working in .cpp source file and generate a file with GNU C++ 11(-std=gnu++11) Standard toolchain.
I want to Build and compile basic hello world code with this toolchain.
I also try to modify Newlib and NewlibNano Library header but not solve my issue yet.
#include <iostream>
using namespace std;
int main()
{
cout << "Hello, World!";
return 0;
}
Above code I want to compile.When I compile this code I got an error(Please find Attachment).
Description Resource Path Location Type
'ECANCELED' was not declared in this scope MIMXRT1062xxxxA_Project_CES_DEMO line 126, external location: c:\nxp\mcuxpressoide_11.0.0_2516\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.0.0.201905131304\tools\arm-none-eabi\include\c++\8.2.1\arm-none-eabi\thumb\v7e-m+dp\hard\bits\error_constants.h C/C++ Problem
'ENOTRECOVERABLE' was not declared in this scope MIMXRT1062xxxxA_Project_CES_DEMO line 151, external location: c:\nxp\mcuxpressoide_11.0.0_2516\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.0.0.201905131304\tools\arm-none-eabi\include\c++\8.2.1\arm-none-eabi\thumb\v7e-m+dp\hard\bits\error_constants.h C/C++ Problem
'ENOTSUP' was not declared in this scope MIMXRT1062xxxxA_Project_CES_DEMO line 122, external location: c:\nxp\mcuxpressoide_11.0.0_2516\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.0.0.201905131304\tools\arm-none-eabi\include\c++\8.2.1\arm-none-eabi\thumb\v7e-m+dp\hard\bits\error_constants.h C/C++ Problem
'EOWNERDEAD' was not declared in this scope MIMXRT1062xxxxA_Project_CES_DEMO line 135, external location: c:\nxp\mcuxpressoide_11.0.0_2516\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.0.0.201905131304\tools\arm-none-eabi\include\c++\8.2.1\arm-none-eabi\thumb\v7e-m+dp\hard\bits\error_constants.h C/C++ Problem
make: *** [source/subdir.mk:49: source/MIMXRT1062xxxxA_Project_CES_DEMO.o] Error 1 MIMXRT1062xxxxA_Project_CES_DEMO C/C++ Problem
make: *** Waiting for unfinished jobs.... MIMXRT1062xxxxA_Project_CES_DEMO C/C++ Problem
How could I resolve this issue?
Kindly give me a way.
Regards,
Pratik Panchal
Yes,you are right.
When we create a new project at that time lwip/errno.h have only a single file include #include "lwip/errno.h".
So, our compiler finds errno.h in system file but not included in lwip/errno.h.
So, just replace following snippet from lwip/errno.h
#ifndef __ERRNO_H__
#define __ERRNO_H__
#include "lwip/errno.h"
#ifndef __error_t_defined
typedef int error_t;
#define __error_t_defined 1
#endif
#include <sys/errno.h>
#endif /* !__ERRNO_H__ */
Thanks for Support.
I ran into this issue as well. The problem was that lwip's version of <errno.h> was being included instead of the standard c++ library version of <errno.h>. By any chance are you compiling with #include path's from lwip?