MalyanSystem / Malyan-M180-Marlin

6 stars 3 forks source link

Cannot Compile #2

Open PhunkMaster opened 8 years ago

PhunkMaster commented 8 years ago

When attempting to compile with Arduino IDE 1.6.10 I am getting the following error:

Arduino: 1.6.10 (Windows 8.1), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from sketch\SdFile.h:27:0,

                 from sketch\cardreader.h:8,

                 from sketch\LcdBoard.cpp:4:

SdBaseFile.h:38: error: using typedef-name 'fpos_t' after 'struct'

 struct fpos_t {

        ^

In file included from sketch\Marlin.h:10:0,

                 from sketch\temperature.h:24,

                 from sketch\LcdBoard.cpp:2:

c:\users\xxx\downloads\arduino-1.6.10-windows\arduino-1.6.10\hardware\tools\avr\avr\include\stdio.h:950:33: note: 'fpos_t' has a previous declaration here

 __extension__ typedef long long fpos_t;

                                 ^

exit status 1
using typedef-name 'fpos_t' after 'struct'

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Board Settings: image

leonardojc commented 5 years ago

I have the same problem. I believe the problem is caused by a new release of avr-libc, where a type with the same name as the one used in sdfat library is introduced.

In upstream SdFat this struct has been renamed to FatPos_t: https://github.com/greiman/SdFat/blob/master/SdFat/SdBaseFile.h#L60 Either do a search&replace in SdBaseFile.{h, cpp} and replace fpos_t with FatPos_t or sed it:

sed -i 's/fpos_t/FatPos_t/' SdBaseFile.h

sed -i 's/fpos_t/FatPos_t/' SdBaseFile.cpp

BasicSeal commented 4 months ago

i had the sa,e problem, i used your fix, it worked but now i am expeiriencing antoher issue: grafik the last lines reads: "failed upload: exit status 1"