SD library problem?

I had some pains using SPI devices on my Due at first.

You cannot use pins 10-13 for SPI on the Due, which is the way most people (including myself) connect SPI on an Uno.

Instead, you have to use the "SPI header" (2x3 male pin header) on the Due, which is in the same location as the ICSP header on the Uno.

Let me know if that helps. There's more info about the the SPI location on the Due at SPI - Arduino Reference
-Anne