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) Sudden weird compile errors (Read 13095 times)
Marc Jacobi
Junior Member
**
Offline


Posts: 28
Location: Netherlands
Joined: Feb 28th, 2012
Sudden weird compile errors
Apr 25th, 2012 at 10:42am
Print Post  
All of a sudden I get these weird compiler errors,

Code
Select All
1>c:\program files\arduino-1.0\hardware\tools\avr\lib\gcc\avr\4.3.2\include\stddef.h(214): error C2371: 'size_t' : redefinition; different basic types
1>          d:\marc\my projects\arduino\atl\source\code\arduinotemplatelibrary\predefined c++ types (compiler internal)(19) : see declaration of 'size_t'
1>c:\program files\arduino-1.0\hardware\tools\avr\avr\include\stdlib.h(106): error C3646: '__attribute__' : unknown override specifier
1>c:\program files\arduino-1.0\hardware\tools\avr\avr\include\stdlib.h(106): error C2065: '__noreturn__' : undeclared identifier
1>c:\program files\arduino-1.0\hardware\tools\avr\avr\include\stdlib.h(106): error C2072: 'abort' : initialization of a function
1>c:\program files\arduino-1.0\hardware\tools\avr\avr\include\stdlib.h(111): error C3646: '__attribute__' : unknown override specifier
1>c:\program files\arduino-1.0\hardware\tools\avr\avr\include\stdlib.h(111): error C2065: '__const__' : undeclared identifier
1>c:\program files\arduino-1.0\hardware\tools\avr\avr\include\stdlib.h(111): error C2072: 'abs' : initialization of a function
1>c:\program files\arduino-1.0\hardware\tools\avr\avr\include\stdlib.h(120): error C3646: '__attribute__' : unknown override specifier
1>c:\program files\arduino-1.0\hardware\tools\avr\avr\include\stdlib.h(120): error C2065: '__const__' : undeclared identifier
1>c:\program files\arduino-1.0\hardware\tools\avr\avr\include\stdlib.h(120): error C2072: 'labs' : initialization of a function
1>c:\program files\arduino-1.0\hardware\tools\avr\avr\include\stdlib.h(152): error C3646: '__asm__' : unknown override specifier
1>c:\program files\arduino-1.0\hardware\tools\avr\avr\include\stdlib.h(152): error C2072: 'div' : initialization of a function
 



and the list goes on.

Any idea what is wrong. I did not change anything. The first time I had this I just created a new project from scratch (with the same name) and copied it over the project I was working in, but now I have it again!  Angry

Suggestions most welcome.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Sudden weird compile errors
Reply #1 - Apr 25th, 2012 at 2:39pm
Print Post  
it's probably the compiler cache. the next version has a "clean" feature for when you re-create projects with the same name.

delete the vm temp folder in 

C:\Users[your initials]\AppData\Local\VMicro\Arduino\Builds

Obviously you might have this folder on d:\ or e:\ or some other drive than c:\
  
Back to top
WWW  
IP Logged
 
Marc Jacobi
Junior Member
**
Offline


Posts: 28
Location: Netherlands
Joined: Feb 28th, 2012
Re: Sudden weird compile errors
Reply #2 - Apr 26th, 2012 at 6:09pm
Print Post  
I had already delete all temp folders in the Build directory, so I also deleted the project folder and that fixed it.

BTW: small error in the path you specified, I found the Build folder at (on WinXP):
C:\Documents and Settings\[User]\Local Settings\Application Data\VMicro\Arduino\Builds
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Sudden weird compile errors
Reply #3 - Apr 27th, 2012 at 7:44am
Print Post  
the best test would have been to open arduino and to compile. it would also have failed.

looking more closly at the error it looks like a normal vs win32 compile which means that vm was no longer performing the compile. 

remember the arduino rules... project name, folder name and main sketch name must all be the same otherwise visual micro assumes a normal c++ project and stops doing its stuff
« Last Edit: Apr 27th, 2012 at 7:45am by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Marc Jacobi
Junior Member
**
Offline


Posts: 28
Location: Netherlands
Joined: Feb 28th, 2012
Re: Sudden weird compile errors
Reply #4 - Apr 29th, 2012 at 2:58pm
Print Post  
Why would you want all these names to be the same when you can just look to see if there's a sketch file present...?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Sudden weird compile errors
Reply #5 - Apr 29th, 2012 at 5:15pm
Print Post  
1)
arduino rules are that folder name must match the name of the main sketch

2)
to keep things efficient for non arduino projects in vs I have tried to avoid looking at the hard disk to determine what files exist. it's very quick in vs to check project name, project folder name and the names of the files in a project. so normal vs use is affected as little as possible my the addin

my question to you is what difference does it really make? all these things seem simple for you to work with and keep things as close to both arduino and vs as possible without breaking either of them?
  
Back to top
WWW  
IP Logged
 
Marc Jacobi
Junior Member
**
Offline


Posts: 28
Location: Netherlands
Joined: Feb 28th, 2012
Re: Sudden weird compile errors
Reply #6 - May 6th, 2012 at 10:49am
Print Post  
1) well, the Arduino rules suck! Smiley Why do you need to follow them? Could you not make your own rules, that make more sense in VS?

2) Dont look at the disk, look at the project for the file name. There could be way more files on disk but only what is actually in the project counts.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Sudden weird compile errors
Reply #7 - May 6th, 2012 at 12:52pm
Print Post  
i thought about that but it would cause compile errors in arduino ide. maybe we can make it an option for more experienced users
  
Back to top
WWW  
IP Logged
 
Marc Jacobi
Junior Member
**
Offline


Posts: 28
Location: Netherlands
Joined: Feb 28th, 2012
Re: Sudden weird compile errors
Reply #8 - May 9th, 2012 at 7:17pm
Print Post  
If you people want to use the Ardiuno IDE fine, let them, but why does VM has to be compatible? Its a totally different IDE! 

I think you should aim for the source files to stay compatible though. It would be really nice if one could switch IDE's, just by dragging all your sources with you. Rebuilding the project file or folder structure is the price of switching.

So, yes please make it an option!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint