ADXL 345 Eval Board code compile problem with Arduino ver18

I downloaded the zip sketch files and installed the Arduino 0018. :smiley: I go to the sketch button then add file and loaded the Makefile file. Press play and it asked for main.c file and tried to compile it. It said it needed one of the other files. :roll: After awhile I figured it out that I needed to load them all. :idea: Then when I press the play button it gives me am error in the for loop in the ADXL345.c file stating :?

"In function ā€˜adxl345_readā€™:

error: ā€˜forā€™ loop initial declaration used outside C99 mode In function ā€˜adxl345_writeā€™:".

So I found help files saying that you canā€™t declare a variable inside a function. :shock: So I move the ā€œint bit=7ā€ on line 45 before the ā€œforā€ and fix the adxl345_write function too. 8)

So now it compiles further and hangs up in ā€œfat.cā€ with a :?:

In function ā€˜fat_append_clustersā€™:

error: ā€˜forā€™ loop initial declaration used outside C99 mode In function ā€˜fat_interpret_dir_entryā€™:

In function ā€˜fat_write_dir_entryā€™:

In function ā€˜fat_get_fs_free_16_callbackā€™:

In function ā€˜fat_get_fs_free_32_callbackā€™:

Now this for loop is much more complex and Iā€™m starting to think I must have something set up wrong but cant find it. :frowning: I know the Eval board works. I just cant compile the code that was associated with it. :cry:

Will this code work with an older version? :x

Do i need to apply the files in a certain way or place? :oops:

Please help! I keep reading and reading to figure this out but I canā€™t. If I could just compile the files that came with it I would feel free to experiment but If I burn blink to this board and cant reload the accelerometer function I wont do it. :lol:

See my response to the same question on the other thread.