2021年1月22日星期五

"error: expected identifier ..." when using trying to use chipKit core in MPLAB, but error is not present when Arduino IDE

As the title states, I'm trying to use the chipkit core in MPLAB X IDE. I'm doing this because I want to be able to properly debug the PIC32 board that I'm using for this project, but I don't have the time to re-write all of the Arduino/Arduino-alike libraries that the project already uses.

However, when trying to compile, I'm running into issues in the chipkit code (not even my code!). The current error that is stumping me is:

In file included from ../../chipKit_pic32/2.1.0/cores/pic32/noniso.c:25:0:  ../../chipKit_pic32/2.1.0/cores/pic32/stdlib_noniso.h:34:5: error: expected identifier or '(' before 'int'   int atoi(const char *s);       ^  ../../chipKit_pic32/2.1.0/cores/pic32/stdlib_noniso.h:36:6: error: expected identifier or '(' before 'long'   long atol(const char* s);        ^  ../../chipKit_pic32/2.1.0/cores/pic32/stdlib_noniso.h:38:8: error: expected declaration specifiers or '...' before numeric constant   double atof(const char* s);          ^  ../../chipKit_pic32/2.1.0/cores/pic32/stdlib_noniso.h:38:8: error: expected declaration specifiers or '...' before numeric constant   double atof(const char* s);          ^  

I can only assume that I'm missing something dumb, but for the life of me I can't find it.

The file "stdlib_noniso.h" is as follows:

#ifndef STDLIB_NONISO_H  #define STDLIB_NONISO_H    //#define _NEED_REVERSE  //#define _NEED_LTOA  //#define _NEED_ULTOA  #define _NEED_DTOSTRF    #ifdef __cplusplus  extern "C"{  

没有评论:

发表评论