Skip to content

Conversation

tokiedokie
Copy link
Contributor

Include SDRAM.h twice, I get the following error

/home/tokiedokie/.arduino15/packages/arduino/hardware/mbed_portenta/4.0.2/libraries/Portenta_SDRAM/src/SDRAM.h:10:7: error: redefinition of 'class SDRAMClass'
 class SDRAMClass {
       ^~~~~~~~~~
In file included from /home/tokiedokie/.var/app/cc.arduino.IDE2/cache/.arduinoIDE-unsaved2024026-51-1ynz9ib.fpy2/sketch_jan26a/sketch_jan26a.ino:1:0:
/home/tokiedokie/.arduino15/packages/arduino/hardware/mbed_portenta/4.0.2/libraries/Portenta_SDRAM/src/SDRAM.h:10:7: note: previous definition of 'class SDRAMClass'
 class SDRAMClass {
       ^~~~~~~~~~

Adding an include guard can solve this problem.

fix: #808

@CLAassistant
Copy link

CLAassistant commented Jan 26, 2024

CLA assistant check
All committers have signed the CLA.

@tokiedokie tokiedokie changed the title Add include guard for SDRAM Libraries: Add include guard for SDRAM Jan 26, 2024
@facchinm facchinm merged commit 68fbece into arduino:main Jan 26, 2024
@tokiedokie tokiedokie deleted the SDRAM-include-guard branch January 29, 2024 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sdram.h gets duplicate class SDRAMClass if included twice
3 participants