error compiling with sdfat: conflicting return type specified for 'virtual int

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

Your problem is a puzzle.

This error message implies an int return type for SdFile::write().

C:\Users\transistor\Documents\Arduino\libraries\SdFat/SdFile.h:43: error: conflicting return type specified for 'virtual int SdFile::write(uint8_t)'

See line 43 of this file https://github.com/greiman/SdFat/blob/master/SdFat/SdFile.h

  size_t write(uint8_t b);

The return type should be size_t.

The same is true for this error:

C:\Users\transistor\Documents\Arduino\libraries\SdFat/MinimumSerial.h:30: error: conflicting return type specified for 'virtual int MinimumSerial::write(uint8_t)'

See line 30 of https://github.com/greiman/SdFat/blob/master/SdFat/MinimumSerial.h

 size_t write(uint8_t b);

It's as if size_t is defined as int by a macro in another include file. I can't imagine that so there must be another explanation.

Check the above files in your library located here to see if they agree with the ones on GitHub.

C:\Users\transistor\Documents\Arduino\libraries\SdFat

if size_t is defined as int by a macro in another include file

I had it in a file that had nothing to do with either of the libraries. It's compiling fine now.
Frank