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 First test: Errors in stdlib.h (Read 5415 times)
michael_x
Newbies
*
Offline


Posts: 5
Location: Germany
Joined: May 13th, 2013
First test: Errors in stdlib.h
May 14th, 2013 at 9:11am
Print Post  
I have VS2010 and Arduino 1.0 IDE, and got the current VisualStudio addin yesterday.
Toolbar and Menu items show up, 
I solved the issue with the wrong target boards, chose "Uno" as my target.

Trying to compile a dummy .ino with 
[tt]void setup() {}
void loop() {} [/tt]
fails with 10 errors, starting with  
[color=#ff0000]IntelliSense: expected a '{'      
c:\program files (x86)\arduino-1.0\hardware\tools\avr\avr\include\stdlib.h      106      13[/color]      

stdlib.h line 106 is 
extern void abort(void) __ATTR_NORETURN__;

and _ATTR_NORETURN__ is undefined because its definition ( in line 92 ) is skipped in a 
[tt]#ifndef __DOXYGEN__ [/tt]

__DOXYGEN__ however is defined in .Test1.vsarduino.h

Seems something unexpected with my VisualStudio, right ? 
How can I further drill this issue down ? 
or is this a standard issue, which I simply overlooked ?
« Last Edit: May 16th, 2013 at 7:08pm by michael_x »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot compile first test: Errors in stdlib.h
Reply #1 - May 14th, 2013 at 9:22am
Print Post  
Hello,

If I understand correctly you are seeing the visual studio c++ intellisense report. Please click the X and close the report. We use the VS C++ system but that errors window can be ignored. To confirm you have a working install do this

1) In the code when you type "Serial." do you see intellisense suggestions?

2) In the menu Debug>Start does this compile and upload?

Thanks
  
Back to top
WWW  
IP Logged
 
michael_x
Newbies
*
Offline


Posts: 5
Location: Germany
Joined: May 13th, 2013
Re: Cannot compile first test: Errors in stdlib.h
Reply #2 - May 14th, 2013 at 9:46am
Print Post  
Tim@Visual Micro wrote on May 14th, 2013 at 9:22am:
To confirm you have a working install do this

1) In the code when you type "Serial." do you see intellisense suggestions?

2) In the menu Debug>Start does this compile and upload?


1) Yes. That's what I hoped the VS environment is good for !
2) It compiles fine, or detects real errors if I provoke some.

Compiling 'Test2' for 'Arduino Uno'
Binary sketch size: 2492 bytes (8% of a 32256 byte maximum) (0.31 secs)
Upload requires a serial port or programmer. Upload cancelled.
or 
Uploading to I/O board using 'COM1'
avrdude: stk500_getsync(): not in sync: resp=0x00

...which is fine for me right now, without an arduino attached.

Thanks a lot for your fast and helpful response. 
I hope my next question will be harder Wink
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot compile first test: Errors in stdlib.h
Reply #3 - May 14th, 2013 at 10:19am
Print Post  
Excellent. 

fyi:

I was finishing some work for arduino due a few days ago and found that for the due we now have almost perfect intellisense reports in vs. I will re-visit the avr stuff and see if we can do the same for uno etc. I know the intellisense reports are not critical but they would be useful if they were better.

Anyway, good to know things are working for you. Look forward to a complex issue Smiley
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint