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 Adding new class generates bogus code (Read 1550 times)
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
Adding new class generates bogus code
Apr 8th, 2018 at 7:40pm
Print Post  
If I add a new class (vMicro->add code->add empty Arduino .cpp & header) line 9 of the code that gets generated references "WProgram.h" which no longer exists. This code needs to be changed to reference "arduino.h", or simplified.


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


Posts: 12155
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Adding new class generates bogus code
Reply #1 - Apr 8th, 2018 at 7:53pm
Print Post  
Hi,

The top part of the condition changes depending on the hardware core you are using.

For normal arduino it will be arduino.h. However some boards use wprogram.h

The very old arduino ide uses wprogram.h regardless.

So its possible that some cores will show useless code that includes wprogram.h or wprogram.h

Which board are you using?
  
Back to top
IP Logged
 
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
Re: Adding new class generates bogus code
Reply #2 - Apr 8th, 2018 at 8:06pm
Print Post  
I use a variety of boards, but the file WProgram.h is not on my hard drive. I installed the latest version of the Arduino IDE and it simply isn't included.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint