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 cannot open source file"wProgram.h" (Read 917 times)
richardv
Newbies
*
Offline


Posts: 4
Joined: Jan 15th, 2023
cannot open source file"wProgram.h"
Jul 1st, 2024 at 4:26am
Print Post  
I am a new user,  please let me know if this is the correct forum. 
I am getting an error after creating a new Arduino Library Project:   
      cannot open source file"WProgram.h"
(no changes made to default project code)

How can I fix this?
Why doesn't the vMicro ribbon appear?

Arduino 2.3.2
Microsoft Visual Studio Community 2022 V17.10.3
Arduino IDE for Visual Studio by Visual Micro - 22.0
(IDE set to Arduino 2)

Thanks




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


Posts: 2695
Joined: Feb 13th, 2019
Re: cannot open source file"wProgram.h"
Reply #1 - Jul 1st, 2024 at 8:43am
Print Post  
Thanks for the report, and it is the correct forum.

The Library project will show the intellisense error you describe, as it does not know which board will be used (as libraries can be written for all architectures and boards), so the Intellisense information cannot be gathered at this point.  The vMicro ribbon also doesn't show for the same reason, as selecting a board could trick you into thinking the code is OK, though it would only be true for the board selected.

Once you have included your library in a Sketch Project, you can navigate to the library files from the sketch (either with go to source from the #include in the INO, or by using the [ur;=https://www.visualmicro.com/page/Show-Hide-Hidden-Files.aspx]vMicro > Show/Hide Hidden Files[/url], and opening it from the Solution Explorer tree).  This will then apply the intellisense information for the board selected in the Sketch Project, to the library project as well.

Let us know if this doesn't make sense, or if you need any further information/examples.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint