# Error compiling I could not find the solution

**URL:** <https://community.particle.io/t/error-compiling-i-could-not-find-the-solution/33120>\
**Category:** Troubleshooting\
**Created:** [May 24, 2017, 8:40am UTC](https://community.particle.io/t/error-compiling-i-could-not-find-the-solution/33120 "2017-05-24T08:40:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ecabanas](https://avatars.discourse-cdn.com/v4/letter/e/ce73a5/32.png) [@ecabanas](https://community.particle.io/u/ecabanas)\
**Post date:** [May 24, 2017, 8:40am UTC](https://community.particle.io/t/error-compiling-i-could-not-find-the-solution/33120/1 "2017-05-24T08:40:53Z")

</div>

Hi,

I’m trying to compile this example but there is an error that I could not fix.

Does anybody knows what’s happen

Thank’s I’m desperate

error:/workspace/lib/spark-dallas-temperature/src/spark-dallas-temperature.h:27:36: fatal error: …/OneWire/OneWire.h: No such file or directory  
#include “…/OneWire/OneWire.h”

code:

```auto
// This #include statement was automatically added by the Particle IDE.
#include <spark-dallas-temperature.h>

// This #include statement was automatically added by the Particle IDE.
#include <OneWire.h>

int oneWirePins[]={D4,D5};
const int oneWirePinsCount
      =sizeof(oneWirePins)/sizeof(int);
 
OneWire ds18x20[oneWirePinsCount] { D4, D5 };
DallasTemperature sensor[oneWirePinsCount] { &ds18x20[0], &ds18x20[1] };

void setup() {
  Serial.begin(9600);
  Serial.print("============Ready with ");
  Serial.print(oneWirePinsCount);
  Serial.println(" Sensors================");
 
  //Start up the library on all defined pins
  DeviceAddress deviceAddress;
  for (int i=0; i<oneWirePinsCount; i++) {;
    //ds18x20[i].setPin(oneWirePins[i]);
    //sensor[i].setOneWire(&ds18x20[i]);
    sensor[i].begin();
    if (sensor[i].getAddress(deviceAddress, 0)) 
      sensor[i].setResolution(deviceAddress, 12);
  }
void loop(void) {
  Serial.print("Requesting temperatures...");
  for (int i=0; i<oneWirePinsCount; i++) {
    sensor[i].requestTemperatures();
  }
  Serial.println("DONE");
 
  delay(1000);
  for (int i=0; i<oneWirePinsCount; i++) {
    float temperature=sensor[i].getTempCByIndex(0);
    Serial.print("Temperature for the sensor ");
    Serial.print(i);
    Serial.print(" is ");
    Serial.println(temperature);
  }
  Serial.println();
}

```

---

<div class="post-metadata">

**Author:** ![Suriken](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@Suriken](https://community.particle.io/u/Suriken)\
**Post date:** [May 24, 2017, 10:36am UTC](https://community.particle.io/t/error-compiling-i-could-not-find-the-solution/33120/2 "2017-05-24T10:36:36Z")

</div>

Do you have OneWire library in folder?

I had this error some months ago. I downloaded OneWire library and include in the app’s folder.

---

<div class="post-metadata">

**Author:** ![ecabanas](https://avatars.discourse-cdn.com/v4/letter/e/ce73a5/32.png) [@ecabanas](https://community.particle.io/u/ecabanas)\
**Post date:** [May 24, 2017, 11:02am UTC](https://community.particle.io/t/error-compiling-i-could-not-find-the-solution/33120/3 "2017-05-24T11:02:01Z")

</div>

> [@Suriken](#):
>
> downlo

yes, OneWire an spark dallas library....ok I'm going to copy the library directly to the folder.

Thank's

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [May 24, 2017, 11:29am UTC](https://community.particle.io/t/error-compiling-i-could-not-find-the-solution/33120/4 "2017-05-24T11:29:41Z")

</div>

Actually that’s not the intended way to do it.  
First we’d need to know what dev environment you are using and what system version you are targeting.

With this info we may be able to walk you through the intended process.

---

<div class="post-metadata">

**Author:** ![ecabanas](https://avatars.discourse-cdn.com/v4/letter/e/ce73a5/32.png) [@ecabanas](https://community.particle.io/u/ecabanas)\
**Post date:** [May 29, 2017, 2:08pm UTC](https://community.particle.io/t/error-compiling-i-could-not-find-the-solution/33120/5 "2017-05-29T14:08:48Z")

</div>

> [@Suriken](#):
>
> r some mont

Suriken,

How do I put the library manually, i thought I did but no, still with the errors compiling

Thank's

---

<div class="post-metadata">

**Author:** ![Suriken](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@Suriken](https://community.particle.io/u/Suriken)\
**Post date:** [May 29, 2017, 2:27pm UTC](https://community.particle.io/t/error-compiling-i-could-not-find-the-solution/33120/6 "2017-05-29T14:27:19Z")

</div>

Haven’t you had luck with importing libraries button?

What I usually do is create 2 files Library.cpp and Library.h where Library is the name of the files I want to copy. Then, I open the files on the online ide and copy&paste the content inside my files.

I usually keep those files in my project folder so you can include with #include “Library.h”

I know this is not the intended way, but when I had to do this, I had no luck with the current way at that time.
