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) error - stdarg.h -> var_arg (Read 7456 times)
Lior
Newbies
*
Offline


Posts: 8
Joined: Apr 24th, 2018
error - stdarg.h -> var_arg
Apr 24th, 2018 at 9:58pm
Print Post  
hi 
I have a problem with stdarg.h

when i call to var_arg its shows an error 
"type name is not allowed" even though I call it with a int Type

when i go to var_arg definition its shows that 

how can i fix that (everything fine with the code on arduino IDE compiler)


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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: error - stdarg.h -> var_arg
Reply #1 - Apr 24th, 2018 at 10:25pm
Print Post  
The intellisense and the build system are different

Can you confirm build happens correctly and same as arduino ide?

Then confirm what board/toolchain you are using?

Thanks
  
Back to top
IP Logged
 
Lior
Newbies
*
Offline


Posts: 8
Joined: Apr 24th, 2018
Re: error - stdarg.h -> var_arg
Reply #2 - Apr 25th, 2018 at 4:19am
Print Post  
actually its success to build and upload (to the Arduino MICRO)

but shows an error on the var_args

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: error - stdarg.h -> var_arg
Reply #3 - Apr 25th, 2018 at 7:08am
Print Post  
Great

What is the exact line of code that shows an intellisense error?
  
Back to top
IP Logged
 
Lior
Newbies
*
Offline


Posts: 8
Joined: Apr 24th, 2018
Re: error - stdarg.h -> var_arg
Reply #4 - Apr 25th, 2018 at 7:25am
Print Post  
E0254 type name is not allowed
  

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: error - stdarg.h -> var_arg
Reply #5 - Apr 25th, 2018 at 10:00am
Print Post  
Thanks, I will add an intellisense workaround for that in the next release

If you put the attached file in the project/_vm folder then build it adds an intellisense patch that removes the red line. The build is only required to detect the new .h file. The .h does not have to be #included in your code.



  

Please Register or Login to the Forum to see File Attachments
Back to top
IP Logged
 
Lior
Newbies
*
Offline


Posts: 8
Joined: Apr 24th, 2018
Re: error - stdarg.h -> var_arg
Reply #6 - Apr 25th, 2018 at 10:53am
Print Post  
tnx for the fast replay 
but it still shows the red mark 

  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Lior
Newbies
*
Offline


Posts: 8
Joined: Apr 24th, 2018
Re: error - stdarg.h -> var_arg
Reply #7 - Apr 25th, 2018 at 1:46pm
Print Post  
I don't have a vs-intellisense-fix.h

note that in projectname.vsarduino.h , __buildin_var_arg (v,l)dont have a define

I'm adding my project so you can see that
  

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: error - stdarg.h -> var_arg
Reply #8 - Apr 25th, 2018 at 1:53pm
Print Post  
I have removed my last message so that you can re-read my previous message (also see the vs-intellisense-fix.h that is attached to the message)
« Last Edit: Apr 25th, 2018 at 1:54pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Lior
Newbies
*
Offline


Posts: 8
Joined: Apr 24th, 2018
Re: error - stdarg.h -> var_arg
Reply #9 - Apr 25th, 2018 at 2:32pm
Print Post  
ohh sorry,
i didnt saw that, tnx

but i cant download the file

please send it to Lior.Itzhak@s.afeka.ac.il
  
Back to top
 
IP Logged
 
Lior
Newbies
*
Offline


Posts: 8
Joined: Apr 24th, 2018
Re: error - stdarg.h -> var_arg
Reply #10 - Apr 25th, 2018 at 3:36pm
Print Post  
tnx  got it

now its shows diffrent error 

Error (active)      E0029      expected an expression

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: error - stdarg.h -> var_arg
Reply #11 - Apr 25th, 2018 at 4:06pm
Print Post  
Please post your code as text with numOfPins defined

Also confirm arduino ide version or switch on vmicro>compiler>show build properties and verbose then email the output as .txt file along with lonk to this post.

Also confirm name of board "Arduino/Genuino Micro"?

« Last Edit: Apr 25th, 2018 at 4:07pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: error - stdarg.h -> var_arg
Reply #12 - Apr 25th, 2018 at 4:26pm
Print Post  
I have looked into this some more. You are using low level gcc calls and we are fighting with visual studio c++ intellisense. I will update visual micro over the next few days to try to make things better in visual studio but because you are using atmel hardware you should install atmel studio and the visual micro extension. 

Atmel studio is actually visual studio 2015 + Gcc intellisense. 

Atmel should work better but the next release of visual micro will also ensure we don't try to confuse things in atmel studio by applying vs intellisense fixes. 

If you are going to work with gcc which is advanced arduino I think atmel studio is a better option for you anyway.
  
Back to top
IP Logged
 
Lior
Newbies
*
Offline


Posts: 8
Joined: Apr 24th, 2018
Re: error - stdarg.h -> var_arg
Reply #13 - Apr 25th, 2018 at 4:39pm
Print Post  

OK' i will try it soon


tnx
  
Back to top
 
IP Logged
 
Lior
Newbies
*
Offline


Posts: 8
Joined: Apr 24th, 2018
Re: error - stdarg.h -> var_arg
Reply #14 - Apr 25th, 2018 at 6:18pm
Print Post  
TNX its working!

Im so grateful' thank you very much


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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: error - stdarg.h -> var_arg
Reply #15 - Apr 25th, 2018 at 8:38pm
Print Post  
Excellent. 

tip: You do not need to copy/add stdarg.h to an arduino project. It is part of the core so you can just add the #include where needed
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint