Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
  Before Logging a Support Issue in the Forum, please ensure you have:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
Save the new Output to a Text File and....
  • Attach it to your post
  • 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
      HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
     
    Page Index Toggle Pages: 1
    Send Topic Print
    First test: Errors in stdlib.h (Read 4066 times)
    michael_x
    Junior Member
    **
    Offline



    Posts: 5
    Germany
    First test: Errors in stdlib.h
    May 14th, 2013 at 10:11am
     
    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 ?
    Back to top
    « Last Edit: May 16th, 2013 at 8:08pm by michael_x »  
     
    IP Logged
     
    Visual Micro
    Administrator
    *****
    Offline



    Posts: 9678
    United Kingdom
    Re: Cannot compile first test: Errors in stdlib.h
    Reply #1 - May 14th, 2013 at 10:22am
     
    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
    Junior Member
    **
    Offline



    Posts: 5
    Germany
    Re: Cannot compile first test: Errors in stdlib.h
    Reply #2 - May 14th, 2013 at 10:46am
     
    Visual Micro wrote on May 14th, 2013 at 10: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
     
    Visual Micro
    Administrator
    *****
    Offline



    Posts: 9678
    United Kingdom
    Re: Cannot compile first test: Errors in stdlib.h
    Reply #3 - May 14th, 2013 at 11:19am
     
    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 Topic Print