compiling error " in function 'loop': "

ok so bear with me because im a total newbie...

so i keep getting this error when trying to compile my code for a weather station

the error is:

AltimeterBarometricHumidifyLCD.cpp.o: In function `loop':

C:\Program Files (x86)\Arduino/AltimeterBarometricHumidifyLCD.ino:57: undefined reference to `dht11::read(int)'

my code atm code @ pastebin

(deleted)

thnx for your reply!

as i think i have the library correctly installed i will post the .ino file.

AltimeterBarometricHumidifyLCD.ino (8.89 KB)

Looking at the error message I join @spycatcher2k.
It looks as if the library is not found.

How did you install it?
What you could do from within the IDE:

  • delete the include statement in your code
  • then go to Arduino menu and include the library manually by selecting it in the drop down menu, where Arduino keeps all its properly installed libraries.

If that fails - then your library is not properly installed, maybe in another (non-Arduino standard folder).

You can alternatively install any library by selcting the zip-file of the requested lib; then your Ardu copies the content at its desired location automatically.

After that you might re-start the IDE agin to make sure that the new lib is really connected with it.

Good luck.

The library is probably installed correctly as you would get an error if the dht11.h header could not be found.
(depends on the compiler version as some versions of gcc do not consider a missing include an error: :o )
The more recent gcc now once again consider a missing header an error just like it should be and had been for many decades.
However, there are many different dht11 libraries out there and they work differently.
Which library are you using?

--- bill

The dht11 library I have does not have a read() method. It has readTemperature() and readHumidity().

so i will have to change the argment in the code that say read and replace it with readtemperature and readhumidity ?

thnx

so i will have to change the argment in the code that say read and replace it with readtemperature and readhumidity ?

No. You need to answer the questions that have been asked, just like we do.