Hello,
I have a Due project on Arduino 1.5.6-r2 with the ArduinoEthernetShield. I can' t compile it with the sdfat library from GitHub - greiman/SdFat: Arduino FAT16/FAT32 exFAT Library.
I get : conflicting return type specified for 'virtual int SdFile::write(uint8_t)
In file included from C:\Users\transistor\Documents\Arduino\libraries\SdFat/SdFat.h:38,
from /testreport.h:14,
from /servepage.h:14,
from sdfatusage.ino:32:
C:\Users\transistor\Documents\Arduino\libraries\SdFat/SdFile.h:43: error: conflicting return type specified for 'virtual int SdFile::write(uint8_t)'
C:\Program Files (x86)\Arduino\hardware\arduino\sam\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'
In file included from C:\Users\transistor\Documents\Arduino\libraries\SdFat/SdFat.h:41,
from /testreport.h:14,
from /servepage.h:14,
from sdfatusage.ino:32:
C:\Users\transistor\Documents\Arduino\libraries\SdFat/MinimumSerial.h:30: error: conflicting return type specified for 'virtual int MinimumSerial::write(uint8_t)'
C:\Program Files (x86)\Arduino\hardware\arduino\sam\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'
I originally tried with the SD library included in the IDE and got the same problem. The testreport.h:14 and servepage.h:14 are both tabs from my sketch. I include testreport.h in servepage.h. The testreport.h has:
#ifndef TESTREPORT_H
#define TESTREPORT_H
#include "Arduino.h"
#include <SdFat.h>
class TestReport{
public:
...
//...my method declarations.
private:
SdFat sd;
SdFile myFile;
//...my method declarations.
};
In my main tab, I have
#include <SPI.h>
#include <Ethernet.h>
#include <EthernetUdp.h>
#include <Dns.h>
#include <Wire.h>
#include "servepage.h"
#include "testreport.h"
I was able to run both the sdfat and sd libraries sketch stand alone examples on the Due. I can run properly all my personal Ethernet code too. I just can't compile them together. Suggestions please.
Thanks,
Frank