Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) Adafruit_Sensor.h: No such file or directory in Visual Micro...works fine in Arduino IDE (Read 7476 times)
jong
Newbies
*
Offline


Posts: 7
Joined: Jul 9th, 2016
Adafruit_Sensor.h: No such file or directory in Visual Micro...works fine in Arduino IDE
Jul 9th, 2016 at 12:33am
Print Post  
I'm getting this error in Visual Micro
Code
Select All
DHT22.cpp:5:29: fatal error: Adafruit_Sensor.h: No such file or directory
:#include <Adafruit_Sensor.h>
:compilation terminated
Error compiling project sources
 


But I can build the ino using the Arduino IDE.

Can you help me debug?

Thx,
Jon
« Last Edit: Jul 9th, 2016 at 1:08am by jong »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Adafruit_Sensor.h: No such file or directory in Visual Micro...works fine in Arduino IDE
Reply #1 - Jul 9th, 2016 at 1:00am
Print Post  
Hi,

Please switch on vMicro>Compiler>Verbose then build and save the output to a .txt. The email to info[at]visualmicro.com or attach to a post here

Thanks
  
Back to top
IP Logged
 
jong
Newbies
*
Offline


Posts: 7
Joined: Jul 9th, 2016
Re: Adafruit_Sensor.h: No such file or directory in Visual Micro...works fine in Arduino IDE
Reply #2 - Jul 9th, 2016 at 1:07am
Print Post  
File attached.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Adafruit_Sensor.h: No such file or directory in Visual Micro...works fine in Arduino IDE
Reply #3 - Jul 9th, 2016 at 1:13am
Print Post  
1)
Maybe an issue resolving libraries if only declared in a .h and not just in .cpp. Please confirm ...

Have you got the #include <Adafruit_Sensor.h> in the DHT22.cpp or in DHT22.h?

2)
If 1) is a bug then a workaround will be to also add an #include <Adafruit_Sensor.h> to the project_name.ino. or add the #include to the .h
« Last Edit: Jul 9th, 2016 at 1:14am by Tim@Visual Micro »  
Back to top
IP Logged
 
jong
Newbies
*
Offline


Posts: 7
Joined: Jul 9th, 2016
Re: Adafruit_Sensor.h: No such file or directory in Visual Micro...works fine in Arduino IDE
Reply #4 - Jul 9th, 2016 at 1:40am
Print Post  
Tim@Visual Micro wrote on Jul 9th, 2016 at 1:13am:
1)
Maybe an issue resolving libraries if only declared in a .h and not just in .cpp. Please confirm ...

Have you got the #include <Adafruit_Sensor.h> in the DHT22.cpp or in DHT22.h?

2)
If 1) is a bug then a workaround will be to also add an #include <Adafruit_Sensor.h> to the project_name.ino. or add the #include to the .h


I put
Code
Select All
#include "App.h"
#include "ESP8266_Init.h"
#include <DHT_U.h>

void setup() {
	esp8266_init();
	app_run();
}

void loop() {
	// Not used
}
 



DHT_U.h in the INO and it compiles.

Why do I have to do this with vMicro and not Arduino IDE?

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Adafruit_Sensor.h: No such file or directory in Visual Micro...works fine in Arduino IDE
Reply #5 - Jul 9th, 2016 at 1:44am
Print Post  
It should work the same. I will test it.

Is vmicro,compiler,deep search switched on?
  
Back to top
IP Logged
 
jong
Newbies
*
Offline


Posts: 7
Joined: Jul 9th, 2016
Re: Adafruit_Sensor.h: No such file or directory in Visual Micro...works fine in Arduino IDE
Reply #6 - Jul 9th, 2016 at 1:50am
Print Post  
Tim@Visual Micro wrote on Jul 9th, 2016 at 1:44am:
It should work the same. I will test it.

Is vmicro,compiler,deep search switched on?


thx  yes
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Adafruit_Sensor.h: No such file or directory in Visual Micro...works fine in Arduino IDE
Reply #7 - Jul 9th, 2016 at 7:30pm
Print Post  
Thanks

Is DHT_U.h a library or part of a library?

Is Adafruit_Sensor.h a library or part of a library?

If libraries please give download location or lib name

Thanks
  
Back to top
IP Logged
 
jong
Newbies
*
Offline


Posts: 7
Joined: Jul 9th, 2016
Re: Adafruit_Sensor.h: No such file or directory in Visual Micro...works fine in Arduino IDE
Reply #8 - Jul 9th, 2016 at 7:33pm
Print Post  
Tim@Visual Micro wrote on Jul 9th, 2016 at 7:30pm:
Is DHT_U.h a library or part of a library?

Is Adafruit_Sensor.h a library or part of a library?


You can get them via the Library Manager.

Adafruit Unified Sensor and DHT

see attached.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Adafruit_Sensor.h: No such file or directory in Visual Micro...works fine in Arduino IDE
Reply #9 - Jul 9th, 2016 at 7:50pm
Print Post  
Thanks very much
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint