Go Down

Topic: 1.5.8 IDE has problem with including SPI.h recursively  (Read 105 times) previous topic - next topic

NickZhang

let's say i have to use UTFT library . which contain two files

UTFT.h
Code: [Select]
#include <SPI.h>
....


UTFT.cpp
Code: [Select]

#include "UTFT.h"


Normally, as i expected this should include UTFT.h, and hence SPI.h at the same time

something.ino
Code: [Select]

#include <UTFT.h>



however, this gives error
Code: [Select]
atal error: SPI.h: No such file or directory
 #include "SPI.h"



and i have to do this

something.ino
Code: [Select]

#include <SPI.h>
#include <UTFT.h>



I believe this is a bug.
thanks

bobcousins

It is a "feature". :)

The Arduino IDE tries to help the user by finding library paths, as an alternative to the user having to specify paths.

The net result is as you discover, an Arduino sketch is not handled the same as a regular C++ program.
Please don't PM me asking for help. Ask questions in the forum.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy