EmonTxV3CM compile error - Arduino IDE

Hi,

I downloaded the latest FW, and tried to compile under Win/Arduino IDE, but i get this error:

“Arduino: 1.8.19 (Windows 10), Board: “Arduino Uno”
libraries\EmonLibCM-master\emonLibCM.cpp.o (symbol from plugin): In function DS18B20_PWR': (.text+0x0): multiple definition of assumedVrms’
sketch\EmonTxV3CM.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino Uno.”

Idon’t know, how can I solve it, please, help me!

Peter

Now i tried this version, and now I can compile:
https://community.openenergymonitor.org/uploads/short-url/tPz0uVfDxInGNWuPgvVhwchs6IG.zip

I think your latest software isn’t. I seem to remember renaming the variable to avoid this, it was quite a while ago - yes: “Version 2.1.2 7/8/2021 ‘assumedACVoltage’ was ‘assumedVrms’ (name conflict in some sketches).”
So I suggest you get the real latest version from the emonLibCM topic on the forum. That should solve your problem. You should always go there for the latest version.

Thanks Robert, you are right.
At first I downloaded an older version from here: GitHub - openenergymonitor/EmonTxV3CM: EmonTxV3 Continuous Monitoring Firmware (Default shipped EmonTxV3 firmware)
On this readme.md I found a link (GitHub - openenergymonitor/EmonLibCM: Continuous Monitoring alternative to EmonLib), which isn’t the latest version of this.

Have a nice day,
Peter

A cleaner way to fix this is to declare the assumedVrms variable as static in emonLibCM.cpp - this restricts the name scope, and avoids any naming clashes in future as well :slight_smile: