Go Down

Topic: DallasTemperature does not name a type error (Read 3012 times) previous topic - next topic


I am using the Xcode IDE with my Arduino.  I don't have a problem compiling sketches that use onewire protocal in the Arduino IDE, but in Xcode, I'm getting this error:
DallasTemperature does not name a type
Below is a simple sketch that causes the error and I attached the libraries.  I can't figure out why Xcode gives me this error.  Can anyone help.

Code: [Select]
#include "Arduino.h"
#include <OneWire.h>
#include <DallasTemperature.h>
OneWire oneWire(2);
DallasTemperature waterTempSensors(&oneWire);  // Get error here
void setup() {}
void loop() {}


I found the problem.  My library folder name needs to match the library name.  I had my library like this:

I renamed the folder \OneWireDallasTemp\ to \DallasTemperature\ and now it compiles.  I guess the Arduino IDE doesn't care about the directory name but Xcode does.

Go Up