Closed salfter closed 5 years ago
The mixture of C and C++ is a bit of a pitfall, not to mention the order of includes is sometimes very fiddly. We'll get this worked out during the process of shuffling core headers around.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Description
I've been having problems building for the Re-ARM...see #15277. I undid my fix, applied the most recent commit in its place, and now I'm getting this:
An AtMEGA2560 build for another printer completed without issue, which suggests there's still something off in the LPC1768-specific code.
I think I've narrowed it down to src/HAL/HAL_LPC1768/include/digipot_mcp4451_I2C_routines.c. AFAICT, this hardware is used by the MKS SBASE, but I'm using a RAMPS on an Re-ARM.
#ifdef TARGET_LPC1768
causes inc/MarlinConfigPre.h to get loaded here, but maybe some files somewhere either aren't getting included or are included in the wrong order as it's complaining that a standard header is missing. If I change the#ifdef
to an#ifndef
(not a production-grade fix, but this is only for testing) so that the entire file is essentially skipped, the firmware builds without issue.One possibility: is a C++ header, but digipot_mcp4451_I2C_routines.c is a C file. My skills with C vs. C++ are sufficiently rusty that I'm not sure how to untangle this and get it building right, other than with the
#ifndef
hack described above.Steps to Reproduce
Expected behavior: [What you expect to happen]
successful build
Actual behavior: [What actually happens]