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) Strange Compile Errors (Read 7996 times)
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
Strange Compile Errors
Jul 5th, 2016 at 2:02pm
Print Post  
I am experiencing three strange compile errors:

error: 'MicroDebug' was not declared in this scope @ line 64
error: 'MicroDebug' was not declared in this scope @ line 78
error: '_VM_AUTO_REPORT_LAST_MS_' was not declared in this scope @ line 78

Line 65 is "void setup() {"
and line 78 is "void loop() {"

I have attached the entire code base. The verbose BuildOutput is in the root folder.
  

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


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Strange Compile Errors
Reply #1 - Jul 5th, 2016 at 2:07pm
Print Post  
Hi Bob,

Please zip the temp build folder so I can see what is being compiled.

Thanks
  
Back to top
IP Logged
 
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
Re: Strange Compile Errors
Reply #2 - Jul 5th, 2016 at 2:29pm
Print Post  
I could not find where the default temp folder is located so I created a folder in my Arduino root, but when I compiled, noting was in that folder.

How do I reset the temp folder to it's default and where is that?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Strange Compile Errors
Reply #3 - Jul 5th, 2016 at 2:31pm
Print Post  
You can switch on "vMicro>Compiler>Show build folder" but it will also be displayed in the Verbose output
  
Back to top
IP Logged
 
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
Re: Strange Compile Errors
Reply #4 - Jul 5th, 2016 at 2:52pm
Print Post  
I saw that http://www.visualmicro.com/forums/YaBB.pl?num=1467306804 was having the same problem so I added int dummy; at the top of my file and now am getting different errors.

The temp build folder is over 500K, so I cannot submit it through this interface. Any alternatives?
  

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


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Strange Compile Errors
Reply #5 - Jul 5th, 2016 at 2:55pm
Print Post  
I just need to see the compass.cpp from the build folder

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


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Strange Compile Errors
Reply #6 - Jul 5th, 2016 at 2:58pm
Print Post  
The problem is that you have added a copy of the library source code to your project.

Delete the following from your project and from the project folder

HMC5883L.cpp
HMC5883L.h
twi.cpp
twi.h
Wire.cpp
Wire.h
  
Back to top
IP Logged
 
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
Re: Strange Compile Errors
Reply #7 - Jul 5th, 2016 at 2:59pm
Print Post  
See attached
  

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


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Strange Compile Errors
Reply #8 - Jul 5th, 2016 at 3:03pm
Print Post  
Looks good except that you need to use chevrons to include files that are not in your project
#include <lib.h>

not

#include "Wire.h"
#include "twi.h"
#include "HMC5883L.h""

  
Back to top
IP Logged
 
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
Re: Strange Compile Errors
Reply #9 - Jul 5th, 2016 at 3:06pm
Print Post  
Right you are... but I am still stumped. Why could it not find these files int their libraries before? Could it have been the conditional compiles and #ifdef statements at the top of the compass.ino file?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Strange Compile Errors
Reply #10 - Jul 5th, 2016 at 3:14pm
Print Post  
Yes the insert point for the standard headers (debug and arduino.h) will have been inside some code that is currently disabled
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint