Skip to content
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

The lib is not compiled #26

Closed
goosedb opened this issue Jul 24, 2019 · 3 comments
Closed

The lib is not compiled #26

goosedb opened this issue Jul 24, 2019 · 3 comments
Labels

Comments

@goosedb
Copy link

goosedb commented Jul 24, 2019

src/MIDI_Inputs/MCU/VU.hpp:14:31: error: macro "max" requires 2 arguments, but only 1 given
IVU(uint8_t max) : max(max) {}

https://github.com/tttapa/Control-Surface/blob/master/src/MIDI_Inputs/MCU/VU.hpp#L14

I can't get what this code does, and can't fix it myself. Can you fix?

@tttapa
Copy link
Owner

tttapa commented Jul 24, 2019

What board are you using?

The reason is that the Arduino core for your particular board defines a global max macro, which is bad practice because it gives rise to name collisions.
The solution is to #undef max, or use a different name for the variable in the file you mentioned.
I don't have my laptop with me, so I can't test it right now.

tttapa added a commit that referenced this issue Jul 25, 2019
Arduino Core macro `max` results in name collisions, fix by undefining it.
@tttapa
Copy link
Owner

tttapa commented Jul 25, 2019

I created a new branch with a temporary fix. Does it compile now, or are there other errors?

@tttapa tttapa added the bug label Jul 25, 2019
@goosedb goosedb closed this as completed Jul 25, 2019
@goosedb
Copy link
Author

goosedb commented Jul 25, 2019

Yes. It works. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants