tilos / DueWebServer

DueWebServer is a Http-Server library for Arduino Due with full file managing support on SD card, file system time support (NTP) and UDP broadcast discovery.
1 stars 0 forks source link

Compile error in example ino #1

Open AlbanT opened 9 years ago

AlbanT commented 9 years ago

when I try to compile DWebServer.ino using Arduino 1.6.5 using SDfat from https://github.com/greiman/SdFat I get the following error:

F:\Cloud\Box Sync\Arduino\Sketchbook\libraries\DueWebServer\DueWebServer.cpp: In function 'boolean WebServerHandler::get_handler(DueWebServer&)':
F:\Cloud\Box Sync\Arduino\Sketchbook\libraries\DueWebServer\DueWebServer.cpp:533:47: error: invalid conversion from 'FatFile*' to 'SdBaseFile*' [-fpermissive]
     listDirectory(web_server, SdBaseFile::cwd());
                                               ^
In file included from F:\Cloud\Box Sync\Arduino\Sketchbook\libraries\DueWebServer\DueWebServer.cpp:31:0:
F:\Cloud\Box Sync\Arduino\Sketchbook\libraries\DueWebServer\DueWebServer.h:43:8: error:   initializing argument 2 of 'void WebServerHandler::listDirectory(DueWebServer&, SdBaseFile*)' [-fpermissive]
   void listDirectory(DueWebServer& web_server, SdBaseFile* file);
        ^
F:\Cloud\Box Sync\Arduino\Sketchbook\libraries\DueWebServer\DueWebServer.cpp:544:34: error: cannot convert 'SdFile*' to 'SdBaseFile*' for argument '2' to 'void WebServerHandler::listDirectory(DueWebServer&, SdBaseFile*)'
   listDirectory(web_server, &file);
                                  ^
F:\Cloud\Box Sync\Arduino\Sketchbook\libraries\DueWebServer\DueWebServer.cpp: In function 'void WebServerHandler::listFiles(const char*, SdBaseFile*, Client*, uint8_t)':
F:\Cloud\Box Sync\Arduino\Sketchbook\libraries\DueWebServer\DueWebServer.cpp:632:26: error: no matching function for call to 'SdBaseFile::dirName(dir_t&, char [13])'
     file->dirName(p, name);
                          ^
F:\Cloud\Box Sync\Arduino\Sketchbook\libraries\DueWebServer\DueWebServer.cpp:632:26: note: candidate is:
In file included from F:\Cloud\Box Sync\Arduino\Sketchbook\libraries\SdFat/utility/ArduinoFiles.h:28:0,
                 from F:\Cloud\Box Sync\Arduino\Sketchbook\libraries\SdFat/utility/FatLib.h:22,
                 from F:\Cloud\Box Sync\Arduino\Sketchbook\libraries\SdFat/SdFat.h:27,
                 from F:\Cloud\Box Sync\Arduino\Sketchbook\libraries\DueWebServer\DueWebServer.h:24,
                 from F:\Cloud\Box Sync\Arduino\Sketchbook\libraries\DueWebServer\DueWebServer.cpp:31:
F:\Cloud\Box Sync\Arduino\Sketchbook\libraries\SdFat/utility/FatFile.h:303:18: note: static uint8_t FatFile::dirName(const dir_t*, char*)
   static uint8_t dirName(const dir_t* dir, char* name);
                  ^
F:\Cloud\Box Sync\Arduino\Sketchbook\libraries\SdFat/utility/FatFile.h:303:18: note:   no known conversion for argument 1 from 'dir_t {aka directoryEntry}' to 'const dir_t* {aka const directoryEntry*}'
Error compiling.

Any ideas on this? Am I using the wrong SdFat for this library?

AlbanT commented 9 years ago

According to the owner of the SdFat library this library is using a very old version of SdFat.