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) Sketch compiles without errors, but editor shows errors (Read 6250 times)
dawidm
Newbies
*
Offline


Posts: 4
Joined: Nov 6th, 2015
Sketch compiles without errors, but editor shows errors
Nov 6th, 2015 at 9:20pm
Print Post  
I didn't have this problem on another computer. I installed visual studio with c++ and visual micro on new machine and sketches are compiled without errors, but editor shows errors like: 
Quote:
cannot open source file "SPI.h"

Quote:
identifier Serial is undefined

  

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Sketch compiles without errors, but editor shows errors
Reply #1 - Nov 6th, 2015 at 9:50pm
Print Post  
Hi,

Did you save your project?

Which board are you using?

Which Arduino ide?

What happens if you switch to a different board then back to the right one again (using the board list)
« Last Edit: Nov 6th, 2015 at 9:52pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
dawidm
Newbies
*
Offline


Posts: 4
Joined: Nov 6th, 2015
Re: Sketch compiles without errors, but editor shows errors
Reply #2 - Nov 6th, 2015 at 10:13pm
Print Post  
Yes it's saved. I tried to clean build, tried creating another project. Arduino IDE 1.6.5, tried 1.6.6 before (same problems). Board is uno. When i switch a boards i see that document refreshes - errors disappear for vary short moment, then reappear.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Sketch compiles without errors, but editor shows errors
Reply #3 - Nov 6th, 2015 at 10:18pm
Print Post  
Please zip and email your project/sketch folder including sub folders to info[at]visualmicro.com

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Sketch compiles without errors, but editor shows errors
Reply #4 - Nov 6th, 2015 at 10:44pm
Print Post  
Thanks for the files. They show a new empty visual studio project. If this was a test project you created to show the problem then please ensure you have built it at least once and have saved the project not just the .ino. The best way to ensure you have saved properly is to close the ide and click save if/when prompted.

Please also post or email the output after compile. Switch on "Visual Micro>Verbose messages" before compiling. 
Thanks
  
Back to top
WWW  
IP Logged
 
dawidm
Newbies
*
Offline


Posts: 4
Joined: Nov 6th, 2015
Re: Sketch compiles without errors, but editor shows errors
Reply #5 - Nov 6th, 2015 at 10:58pm
Print Post  
I probably was doing one thing wrong - i had solution cloned from git (created in same version of VS and (probably) same version of visual micro). Problem is present only inside this solution and i've been creating new projects inside it (didn't notice it before). When i create new project with new solution, everything works fine. Sorry for wrong report and taking your time Wink

So now the problem it that editor shows errors but sketch compiles fine when using solution cloned from git (this one: https://github.com/dawidm/tracker). It isn't very big problem for me, i will work it around somehow.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Sketch compiles without errors, but editor shows errors
Reply #6 - Nov 6th, 2015 at 11:23pm
Print Post  
Thanks for the info. When the tracker-vs project is open does the toolbar say x86 or x64 or Win32?
« Last Edit: Nov 6th, 2015 at 11:24pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
dawidm
Newbies
*
Offline


Posts: 4
Joined: Nov 6th, 2015
Re: Sketch compiles without errors, but editor shows errors
Reply #7 - Nov 6th, 2015 at 11:32pm
Print Post  
x64, but i've just resolved the problem. In solution properties -> configuration properties -> configuration i had x64 for this cloned project but win32 for newly created solutions. Changing from x64 to win32 resolves the problem Smiley
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Sketch compiles without errors, but editor shows errors
Reply #8 - Nov 6th, 2015 at 11:35pm
Print Post  
Yes I am looking into why the intellisense isn't updated unless the project is set to x86/Win32. You right the compile is unaffected because it doesn't use these vs settings.

Thanks again

« Last Edit: Nov 6th, 2015 at 11:36pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint