# can not compile SD library file Cardinfo

**URL:** <https://community.sparkfun.com/t/can-not-compile-sd-library-file-cardinfo/40008>\
**Category:** ESP32\
**Created:** [July 10, 2020, 11:07pm UTC](https://community.sparkfun.com/t/can-not-compile-sd-library-file-cardinfo/40008 "2020-07-10T23:07:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![RUDOLPH\_RUFF](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@RUDOLPH\_RUFF](https://community.sparkfun.com/u/RUDOLPH_RUFF)\
**Post date:** [July 10, 2020, 11:07pm UTC](https://community.sparkfun.com/t/can-not-compile-sd-library-file-cardinfo/40008/1 "2020-07-10T23:07:36Z")

</div>

This is really a programming issue but I can not figure out how to post on the Arduino Forum.

I have the SparkFun Thing plus Woom and the Adafruit ADALOGGER.

The first 4 active lines of the file Cardinfo are:

* * *

created 28 Mar 2011

by Limor Fried

modified 9 Apr 2012

by Tom Igoe

\*/

// include the SD library:

#include \<SPI.h\>

#include \<SD.h\>

// set up variables using the SD utility library functions:

Sd2Card card;

SdVolume volume;

SdFile root;

* * *

after compiling, the first two errors are:

* * *

Rudys\_CardInfo:27:1: error: ‘Sd2Card’ does not name a type

Sd2Card card;

^

Rudys\_CardInfo:28:1: error: ‘SdVolume’ does not name a type

SdVolume volume;

* * *

If this is not the correct forum for this topic, please head me in the correct directiom.

---

<div class="post-metadata">

**Author:** ![SV-Zanshin](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/sv-zanshin/32/336_2.png) [@SV-Zanshin](https://community.sparkfun.com/u/SV-Zanshin)\
**Post date:** [July 11, 2020, 5:45am UTC](https://community.sparkfun.com/t/can-not-compile-sd-library-file-cardinfo/40008/2 "2020-07-11T05:45:37Z")

</div>

I’ve got numerous sketches with the same declarations and they work. The library definitions for those 3 classes are in “SD.h” and since you have that #included and the include didn’t give an error message, it means that you might have another “SD.h” in your include path which gets found first and used, and this library doesn’t have those classes defined.

Can you search your arduino paths for “SD.h”? There should only be one, and it should contain a class definition for those 3 classes.

---

<div class="post-metadata">

**Author:** ![RUDOLPH\_RUFF](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@RUDOLPH\_RUFF](https://community.sparkfun.com/u/RUDOLPH_RUFF)\
**Post date:** [July 11, 2020, 10:45pm UTC](https://community.sparkfun.com/t/can-not-compile-sd-library-file-cardinfo/40008/3 "2020-07-11T22:45:39Z")

</div>

Thanks. That got me past the first hurdle. Now the compiler gets down to opening my sketch again stops with the error “don’t recognize board” for the pininfo. here is the address that does not have the correct pin info:

C:\Program Files (x86)\Arduino\libraries\SD\src\utility

When I go to the pininfo file, it lists for all kinds of Arduino boards, but not My “Adafruit ESP32Feather”.

So, where would I look for the Feather pin printout and how would I get it into the correct src folder?

Thanks again for your help. This experience should help me on my next SparkFun project.

---

<div class="post-metadata">

**Author:** ![SV-Zanshin](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/sv-zanshin/32/336_2.png) [@SV-Zanshin](https://community.sparkfun.com/u/SV-Zanshin)\
**Post date:** [July 12, 2020, 6:06am UTC](https://community.sparkfun.com/t/can-not-compile-sd-library-file-cardinfo/40008/4 "2020-07-12T06:06:34Z")

</div>

I’m not sure what you mean by the “pininfo” file? I wrote an example program for the Esp32 Feather (and the BME680) a while back that logs data to a SD card, perhaps you could take a look at this program and what I did there. The program is part of the [[BME680 Library](https://github.com/SV-Zanshin/BME680) library, the sketch is at [https://github.com/SV-Zanshin/BME680/tr … FiDemo.ino](https://github.com/SV-Zanshin/BME680/tree/master/examples/ESP32FeatherWiFiDemo/ESP32FeatherWiFiDemo.ino)]([GitHub - Zanduino/BME680: Arduino Library to access the Bosch BME680 - temperature, pressure, humidity and gas sensor](https://github.com/SV-Zanshin/BME680))

---

<div class="post-metadata">

**Author:** ![RUDOLPH\_RUFF](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@RUDOLPH\_RUFF](https://community.sparkfun.com/u/RUDOLPH_RUFF)\
**Post date:** [July 12, 2020, 8:06am UTC](https://community.sparkfun.com/t/can-not-compile-sd-library-file-cardinfo/40008/5 "2020-07-12T08:06:54Z")

</div>

Thanks. I will study your sketch. I did find a file that describes the Feather pinout, but have not found a way to circumvent the call that is giving me trouble.

This will give me a lot to think about.

---

<div class="post-metadata">

**Author:** ![RUDOLPH\_RUFF](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@RUDOLPH\_RUFF](https://community.sparkfun.com/u/RUDOLPH_RUFF)\
**Post date:** [July 13, 2020, 10:05pm UTC](https://community.sparkfun.com/t/can-not-compile-sd-library-file-cardinfo/40008/6 "2020-07-13T22:05:34Z")

</div>

Additional info.

Although the simple programs like CardInfo only call for SD.h, it looks like an addon program, sdfatlib, got loaded which is now called for in SD.h. Now the sketch, Sd2PinMap.h, gets called. This program gives pinout definitions to all kinds of Arduino microprocessors, but not the ADAFruit Feather.

I tried to change the sketch, Sd2PinMap.h, but my HP laptop Windows 10 tells me I don’t have permission to change this program, even though I should have administrator permissions.

So, I am stuck until I figure out how to change this sketch or delete it and do like you did on your BME680 sketch and input the pinout directly.

,

---

<div class="post-metadata">

**Author:** ![RUDOLPH\_RUFF](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@RUDOLPH\_RUFF](https://community.sparkfun.com/u/RUDOLPH_RUFF)\
**Post date:** [July 14, 2020, 12:54am UTC](https://community.sparkfun.com/t/can-not-compile-sd-library-file-cardinfo/40008/7 "2020-07-14T00:54:33Z")

</div>

OK\> I got past that. Now I get error that board can not be initialized. So, I will close out this post because it appears to be a hardware or interface problem and not a sketch problem.

I thank you again for the insight and the direction I needed to go to solve that problem.
