-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Include Arduino.h AFTER memory.h #1440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Arduino.h defines min/max which are then redefined with templates in stl_algobase.h imported from memory.h. This is the least impactful way I can find to get past this for now and unblock use of wificlient in more scenarios.
This is what a failure looks like prior to the fix
|
Somehow, after this submit, i cannot compile with Arduino 1.6.5, it fails with the following issues
and other simillar issues. |
It is certainly worth trying with 1.6.8 (nightly) as 1.6.7 and before have a variety of incompatibilities (arduino/arduino-builder#68). In the likely event that doesn't help we'll need to look for a better way to fix this as we will keep finding scenarios where Arduino.h min/max clobber SDK definitions. Also does it repro in a relatively simple example? If so perhaps share one and I can investigate. |
Arduino.h defines min/max which are then redefined with templates in stl_algobase.h imported from memory.h. This is the least impactful way I can find to get past this for now and unblock use of wificlient in more scenarios.
I haven't yet figured out how this is sometimes working just fine in simple scenarios, but very often any use of WifiClient.h will make it impossible to compile due to conflicting with the other definitions of min/max.
I'm using IDE 1.6.7. This unblocks use of WifiClient and WifiSecureClient successfully for me and shouldn't have negative impacts.