# Error #include \<string\> while compileing

**URL:** <https://forum.arduino.cc/t/error-include-string-while-compileing/411001>\
**Category:** Programming\
**Created:** [October 3, 2016, 7:34am UTC](https://forum.arduino.cc/t/error-include-string-while-compileing/411001 "2016-10-03T07:34:23Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jockeponkenboy](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@Jockeponkenboy](https://forum.arduino.cc/u/Jockeponkenboy)\
**Post date:** [October 3, 2016, 7:34am UTC](https://forum.arduino.cc/t/error-include-string-while-compileing/411001/1 "2016-10-03T07:34:23Z")

</div>

I have download a library called FirebaseArduino. When i trying to compile it i always get a fault (No such file or directory). I have tracked the fault to the library and row (#include )

I have no idea how to solve this problem? I thought that "string" was a standard class for C++ but my Arduino software can´t find it! Does someone know where i can download the string class?

Best regards

//Jocke

---

<div class="post-metadata">

**Author:** ![Jockeponkenboy](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@Jockeponkenboy](https://forum.arduino.cc/u/Jockeponkenboy)\
**Post date:** [October 3, 2016, 4:40pm UTC](https://forum.arduino.cc/t/error-include-string-while-compileing/411001/2 "2016-10-03T16:40:57Z")

</div>

If I change the code from #include to #include \<string.h\> then the error disappear. But I get the same error on another lib (#include ) later in the same compilation!

I guess there is something wrong with my librarys. Anyone have a clue?

---

<div class="post-metadata">

**Author:** ![pert](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/pert/32/217111_2.png) [@pert](https://forum.arduino.cc/u/pert)\
**Post date:** [October 3, 2016, 10:35pm UTC](https://forum.arduino.cc/t/error-include-string-while-compileing/411001/3 "2016-10-03T22:35:05Z")

</div>

Please post a link to where you downloaded the FirebaseArduino library from.

Which board do you have selected in the **Tools \> Board** menu?

---

<div class="post-metadata">

**Author:** ![Jockeponkenboy](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@Jockeponkenboy](https://forum.arduino.cc/u/Jockeponkenboy)\
**Post date:** [October 4, 2016, 2:10pm UTC](https://forum.arduino.cc/t/error-include-string-while-compileing/411001/4 "2016-10-04T14:10:22Z")

</div>

I found the library at [GitHub - FirebaseExtended/firebase-arduino: Arduino samples for Firebase.](https://github.com/googlesamples/firebase-arduino)

I've tried Arduino Uno, Nano, And Micro.

---

<div class="post-metadata">

**Author:** ![oqibidipo](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/oqibidipo/32/221794_2.png) [@oqibidipo](https://forum.arduino.cc/u/oqibidipo)\
**Post date:** [October 4, 2016, 2:41pm UTC](https://forum.arduino.cc/t/error-include-string-while-compileing/411001/5 "2016-10-04T14:41:24Z")

</div>

> Jockeponkenboy:  
> I found the library at [GitHub - FirebaseExtended/firebase-arduino: Arduino samples for Firebase.](https://github.com/googlesamples/firebase-arduino)

> [github.com/googlesamples/firebase-arduino:](http://github.com/googlesamples/firebase-arduino:)  
> This repo contains a collection of samples and an Arduino library that show how to call the Firebase API from the **ESP8266** Arduino core.

> I've tried Arduino Uno, Nano, And Micro.

Is any of those an ESP8266 board? (Hint: no.)

---

<div class="post-metadata">

**Author:** ![julyjim](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@julyjim](https://forum.arduino.cc/u/julyjim)\
**Post date:** [October 4, 2016, 5:47pm UTC](https://forum.arduino.cc/t/error-include-string-while-compileing/411001/6 "2016-10-04T17:47:25Z")

</div>

> Jockeponkenboy:  
> If I change the code from #include to #include \<string.h\> then the error disappear. But I get the same error on another lib (#include ) later in the same compilation!
> 
> I guess there is something wrong with my librarys. Anyone have a clue?

C and derived languages standard for header files calls for file extension to be "h" such as "myFile.h" .  
Therefore file without such extension will flag an error.  
Real question is - does the "library" conforms to such standards?  
Jim

---

<div class="post-metadata">

**Author:** ![pert](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/pert/32/217111_2.png) [@pert](https://forum.arduino.cc/u/pert)\
**Post date:** [October 4, 2016, 7:41pm UTC](https://forum.arduino.cc/t/error-include-string-while-compileing/411001/7 "2016-10-04T19:41:10Z")

</div>

> julyjim:  
> C and derived languages standard for header files calls for file extension to be "h" such as "myFile.h" .  
> Therefore file without such extension will flag an error.

That's incorrect. You can include any file name you like. Try it out. There is some trickiness with the way the IDE does automatic include path handling with libraries and sketches but that has nothing to do with a "C and derived languages standard". The extension has nothing to do with this issue.

The problem is that, as the error message indicated, those files don't exist in the AVR toolchain. They do exist in the ESP8266 toolchain, which this library was written for.

---

<div class="post-metadata">

**Author:** ![PaulMurrayCbr](https://avatars.discourse-cdn.com/v4/letter/p/74df32/32.png) [@PaulMurrayCbr](https://forum.arduino.cc/u/PaulMurrayCbr)\
**Post date:** [October 4, 2016, 9:43pm UTC](https://forum.arduino.cc/t/error-include-string-while-compileing/411001/8 "2016-10-04T21:43:59Z")

</div>

The usual convention for include files is .h, which stands for "header". It has been this way since the blue book. All the standard libraries on C platforms everywhere AFAIK use that convention for the standard libraries, so it's a bit of a mystery why the source in this github project fiddles with it.

---

<div class="post-metadata">

**Author:** ![pert](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/pert/32/217111_2.png) [@pert](https://forum.arduino.cc/u/pert)\
**Post date:** [October 4, 2016, 9:52pm UTC](https://forum.arduino.cc/t/error-include-string-while-compileing/411001/9 "2016-10-04T21:52:37Z")

</div>

Arduino is C++, not C. The use of header files with no extension is completely standard. See [C++ Standard Library headers - cppreference.com](http://en.cppreference.com/w/cpp/header)

Some people also use .hpp and .hh for C++ headers. The Arduino developers even added IDE support for these extensions in libraries and sketches([#3186](https://github.com/arduino/Arduino/pull/3186) and [#3485](https://github.com/arduino/Arduino/pull/3485)) but there have been some [regressions](https://github.com/arduino/arduino-builder/issues/181)since that time that have caused some of this functionality to be lost.

---

<div class="post-metadata">

**Author:** ![Jockeponkenboy](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@Jockeponkenboy](https://forum.arduino.cc/u/Jockeponkenboy)\
**Post date:** [October 5, 2016, 6:48am UTC](https://forum.arduino.cc/t/error-include-string-while-compileing/411001/10 "2016-10-05T06:48:52Z")

</div>

Thanks all of you for all the answers! I'm a newbie at Arduino and C++ that's why I sometimes asking dumb questions. Sorry!

I thought that ESP8266 was the name of the WiFi card. And that's explain it all!

//best regards!

---

<div class="post-metadata">

**Author:** ![julyjim](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@julyjim](https://forum.arduino.cc/u/julyjim)\
**Post date:** [October 5, 2016, 1:22pm UTC](https://forum.arduino.cc/t/error-include-string-while-compileing/411001/11 "2016-10-05T13:22:59Z")

</div>

> PaulMurrayCbr:  
> The usual convention for include files is .h, which stands for "header". It has been this way since the blue book. All the standard libraries on C platforms everywhere AFAIK use that convention for the standard libraries, so it's a bit of a mystery why the source in this github project fiddles with it.

It's probably to be helpful to people like me who cannot type.  
It saves memory and it speeds up the compiler by few nanoseconds, right ?  
I often wonder if there is a current "ANSI C standard".  
It seem that Open philosophy means anything goes .  
What is interesting that fundamental subjects like this one often get "answered" - it is C++ , not C.  
Off soap box, back to coding.

Jim

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 5, 2021, 10:06pm UTC](https://forum.arduino.cc/t/error-include-string-while-compileing/411001/12 "2021-05-05T22:06:36Z")

</div>


