Creating new library

Hi.
Im working on new library with extended functionality for OneWire devices. Ive got OneWire and DallasTemperature librariers up and runing. Im able to compile sketches with them without problem. However I need to include headers OneWire.h and DallasTemperature.h into my new lib. Ive made new folder /usr/share/arduino/libraries/Temp.
I`ve created Temp.h and Temp.cpp.
Library is available inside Arduino IDE.
But if only Temp.h has #include<OneWire.h> statement building process fails with:

/usr/share/arduino/libraries/Temp/Temp.h:4:21: error: OneWire.h: No such file or directory

Any idea how to solve this issue?

But if only Temp.h has #include<OneWire.h> statement building process fails with:

/usr/share/arduino/libraries/Temp/Temp.h:4:21: error: OneWire.h: No such file or directory

Your problem statement is hard to understand. “But if only” are hardly ever used (correctly) in that order.

Post your Temp.h file and your sketch.

I haven’t found a way to include a library from another library, if that is what you are trying to do.

The best workaround I have found is to #include all required libraries from the sketch file. Bitlash does that to integrate the Bitlash and Servo libraries, for example.

-br
http://bitlash.net
http://entropymouse.com

#File Temp.h

#ifndef __TEMP__
#define __TEMP__
#include <inttypes.h>
#include <OneWire.h>

class Temp
{
      public:
            Temp(int aPin);
};
#endif
# Temp.cpp
#include "Temp.h"

Temp::Temp(int aPin)
{
}
#Test.pde
#include <Temp.h>
Temp iTemp(10);
void setup()
{
}

void loop()
{
}

Hope this will help.

billroy is right. If you want to use OneWire and DallasTemperature in your library, they need to be included in the sketch, too.

Thanks. It`s working now.