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
Normal Topic Can't find the Wire.h library (Read 3469 times)
Tuan Tran
Newbies
*
Offline


Posts: 4
Joined: Jan 19th, 2023
Can't find the Wire.h library
Feb 4th, 2023 at 10:10am
Print Post  
Hi,
I used to use the free version of Visual Micro before and every thing seemed OK to me. I didn't remember any troubles using it. Just installed the extension on Visual Studio and Arduino IDE and coded. But now, I have just purchased the commercial version and tried to use it. But somethings unusual happens:  Visual Micro can't find the Wire.h library even though  Arduino IDE finds it and compiles the sketch well.
I use Arduino IDE 2.0.3 and Atmega 2560 board. 
Could you please help me to solve my issue?

My sketch is included below

Thank you
« Last Edit: Feb 4th, 2023 at 11:54am by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't find the Wire.h library
Reply #1 - Feb 4th, 2023 at 11:54am
Print Post  
Please follow the guide in yellow above
  
Back to top
IP Logged
 
Tuan Tran
Newbies
*
Offline


Posts: 4
Joined: Jan 19th, 2023
Re: Can't find the Wire.h library
Reply #2 - May 9th, 2023 at 4:11am
Print Post  
Hi Sir,
I am trying to use vMicro for compiling my Arduino sketch which is built and ran without any bug in Arduino IDE installed in the same laptop but it seems that VS2022 can not recognize the paths for the IDE and libraries. Please help me for solving this issue.
Included here is the output text file.

Thank you and best regards,
Tuan Tran
  

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't find the Wire.h library
Reply #3 - May 9th, 2023 at 7:05am
Print Post  
It is not clear where you see the problem. The build output shows good build.

Please explain what issue you see?
  
Back to top
IP Logged
 
Tuan Tran
Newbies
*
Offline


Posts: 4
Joined: Jan 19th, 2023
Re: Can't find the Wire.h library
Reply #4 - May 9th, 2023 at 8:45am
Print Post  
Hi Sir,
As I mentioned before, the complier can not find the libraries while Arduino IDE can, so there are 68 errors in the list included below.
The fist line is: cannot open source file "Adafruit_ADS1X15.h"      means that the library folder is not recognized      
So how can the compiler built the sketch?
Regards
  

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't find the Wire.h library
Reply #5 - May 9th, 2023 at 11:04am
Print Post  
The build output you provided shows that compile is OK

Code
Select All
Program 1015DiffContinuous size: 10210 bytes (used 4% of a 253952 byte maximum) (7.90 secs)
Minimum Memory Usage: 1705 bytes (21% of a 8192 byte maximum)

 


The errors you see must be related to intellisense. The "build" and "intellisense" systems are not related. As an example, switch the Combobox after the errors list to "Build Only", then you will understand the difference.

The intellisense should not show these errors. Is this an old project? Please show screen shot of solution explorer.
« Last Edit: May 9th, 2023 at 11:40am by Tim@Visual Micro »  
Back to top
IP Logged
 
Tuan Tran
Newbies
*
Offline


Posts: 4
Joined: Jan 19th, 2023
Re: Can't find the Wire.h library
Reply #6 - May 10th, 2023 at 7:54am
Print Post  
Hi Sir,
After I opened some Arduino sketches, the Intellisense errors disappeared in Error List. I do not know why. Everything seem to be OK now. Thank you for helping me promptly.

Can I use the debug function with Arduino on this environment?
If yes, do I need to do any configuring?

Thank you and best regards,

Tuan Tran
  

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


Posts: 2431
Joined: Feb 13th, 2019
Re: Can't find the Wire.h library
Reply #7 - May 10th, 2023 at 8:56am
Print Post  
Glad everything is working as expected now. You do have to click build one time for a project to make intellisense accurate. That allows Visual Micro to discover underlying source codes from the compiler results.

The options for debugging the ATMega 2560 are to either use our unique Serial Debugger:
https://www.visualmicro.com/page/User-Guide.aspx?doc=Debugging-Walkthrough-Start...

Or a 3rd Party GDBStub which gives limited Hardware Debugging capability via the Serial Port:
https://www.visualmicro.com/page/AVR-Debugging.aspx
« Last Edit: May 10th, 2023 at 1:13pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint