Compile error message "RF69.h:10: error: expected ‘,’ or ‘...’ before numeric constant"

If you have a compile error and the error message ends "RF69.h:10: error: expected ‘,’ or ‘...’ before numeric constant"

this due to a naming conflict between JeeLib and the OpenEnergyMonitor sketches. The easiest way to resolve this is, in the OEM sketch, to rename "freq" (as in the RFM12B module operating frequency) to "FREQ".

EDIT:

Glyn tells me he's pushed a name change out to GitHub, so the problem should be restricted to those who have downloaded OEM sketches before 8th February 2014 AND have downloaded JeeLib since 3rd February.

glyn.hudson's picture

Re: Compile error message "RF69.h:10: error: expected ‘,’ or ‘...’ before numeric constant"

Yup, all fixed :-) 

Changes pushed to github. Just update JeeLib and grab the latest OEM repos from GitHub

http://openenergymonitor.org/emon/node/3773#comment-18272

calypso_rae's picture

Re: Compile error message "RF69.h:10: error: expected ‘,’ or ‘...’ before numeric constant"

For some reason, none of my own RF-enabled sketches appear to be affected by this conflict.

Maybe this is because I don't use EmonLib or emonTx_lib, only Jeelib.

This is "Black Art" territory!

Tony Antique's picture

Re: Compile error message "RF69.h:10: error: expected ‘,’ or ‘...’ before numeric constant"

I have started to get this same error message since I updated my jeelib-master directory to the current one on Github because I was having problems moving to Arduino Mega 2560.

Has anyone got a solution?

Robert Wall's picture

Re: Compile error message "RF69.h:10: error: expected ‘,’ or ‘...’ before numeric constant"

The solution is in the post that started this thread. Did you not read that?

Tony Antique's picture

Re: Compile error message "RF69.h:10: error: expected ‘,’ or ‘...’ before numeric constant"

I am sorry if I am being thick, but the links above do not lead to a solution.

However, I have just solved it by moving ' #include <JeeLib.h> ' to the first line of my sketch.

Why this should suddenly need to be done I cannot understand. For the last two years this has not been a problem in any of my sketches.

Robert Wall's picture

Re: Compile error message "RF69.h:10: error: expected ‘,’ or ‘...’ before numeric constant"

The problem arose because JeeLib changed the name of a global variable it used, which created a conflict with the name of a different variable used in the sketch. So if, as explained in the first post, you had an 'old' sketch and a 'new' JeeLib, which you seem to have, you have a conflict and hence the error message. The method of resolution I explained in the first post, not in the links.

calypso_rae's picture

Re: Compile error message "RF69.h:10: error: expected ‘,’ or ‘...’ before numeric constant"

I have also found problems that have been solved by moving ' #include <JeeLib.h> ' to the top of the code.

My sketches still use "freq" rather then "FREQ" but do not use emonLib.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.