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

Compilation Problems #4

Open
Oye-Hamzay56 opened this issue Dec 27, 2019 · 1 comment
Open

Compilation Problems #4

Oye-Hamzay56 opened this issue Dec 27, 2019 · 1 comment

Comments

@Oye-Hamzay56
Copy link

When i'm trying to compile the detect example for the above library, arduino IDE gives out the following errors:
`
In file included from C:\Users\hamza\OneDrive\Documents\ArduinoData\packages\arduino\hardware\sam\1.6.12\cores\arduino/WCharacter.h:23:0,

             from C:\Users\hamza\OneDrive\Documents\ArduinoData\packages\arduino\hardware\sam\1.6.12\cores\arduino/Arduino.h:191,

             from C:\Users\hamza\OneDrive\Documents\Arduino\libraries\Goertzel_master\Goertzel.cpp:19:

C:\Users\hamza\OneDrive\Documents\Arduino\libraries\Goertzel_master\Goertzel.cpp:26:5: error: expected unqualified-id before numeric constant

int _N;

 ^

C:\Users\hamza\OneDrive\Documents\Arduino\libraries\Goertzel_master\Goertzel.cpp: In constructor 'Goertzel::Goertzel(float, float, float)':

C:\Users\hamza\OneDrive\Documents\Arduino\libraries\Goertzel_master\Goertzel.cpp:48:8: error: lvalue required as left operand of assignment

  _N=MAXN;

    ^

C:\Users\hamza\OneDrive\Documents\Arduino\libraries\Goertzel_master\Goertzel.cpp:50:7: error: lvalue required as left operand of assignment

 _N=N;

`
Any solution for such errors?

@jephthai
Copy link

I know this is an old comment by now, but the issue is that in some cases the _N macro is already defined (e.g., I'm using this on a Teensy 4.0, and _N is a bad choice). By renaming _N to _NSZ, I'm able to get the code to compile.

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

No branches or pull requests

2 participants