RTClib + GSM.h

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
skaxxo
 
Posts: 25
Joined: Fri May 20, 2011 11:44 am

RTClib + GSM.h

Post by skaxxo »

Hi

I have a "DS1307 Real Time Clock Breakout Board Kit" and an arduino gprs shield.

When i use RTClib + GSM.h i have this error in compiling, what is the problem?

Code: Select all

Arduino:1.6.0 (Windows 7), Scheda:"Arduino Pro or Pro Mini, ATmega328 (3.3V, 8 MHz)"

Opzioni di compilazione cambiate, ricompilo tutto

In file included from GsmWebClient.ino:21:0:
C:\Users\andrea\Documents\Arduino\libraries\RTClib/RTClib.h:59:31: error: redeclaration of 'OFF'
 enum Ds1307SqwPinMode { OFF = 0x00, ON = 0x80, SquareWave1HZ = 0x10, SquareWave4kHz = 0x11, SquareWave8kHz = 0x12, SquareWave32kHz = 0x13 };
                               ^
In file included from C:\Program Files (x86)\Arduino\libraries\GSM\src/GSM3MobileNetworkProvider.h:37:0,
                 from C:\Program Files (x86)\Arduino\libraries\GSM\src/GSM3MobileClientService.h:37,
                 from C:\Program Files (x86)\Arduino\libraries\GSM\src/GSM.h:42,
                 from GsmWebClient.ino:20:
C:\Program Files (x86)\Arduino\libraries\GSM\src/GSM3MobileAccessProvider.h:37:100: note: previous declaration 'GSM3_NetworkStatus_t OFF'
 enum GSM3_NetworkStatus_t { ERROR, IDLE, CONNECTING, GSM_READY, GPRS_READY, TRANSPARENT_CONNECTED, OFF};
                                                                                                    ^
Errore durante la compilazione

  Questo report potrebbe essere più ricco
di informazioni con
  "Mostra un output dettagliato durante la compilazione"
  abilitato in "File > Impostazioni"

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: RTClib + GSM.h

Post by adafruit_support_rick »

The problem is that two different enums define the symbol "OFF". The compiler cannot accept this. You will have to modify one of the libraries to change the symbol "OFF" to something else.

I suggest that changing the RTCLib would probably be easier. Change the symbol to "OFFF", and them make sure to change all references to it in the library.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”