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 Intellisense Error msg - compiles and executes OK (Read 1488 times)
arduinoUser2
Junior Member
**
Offline


Posts: 41
Joined: Dec 30th, 2015
Intellisense Error msg - compiles and executes OK
Mar 10th, 2016 at 1:55pm
Print Post  
I am using a suggested code line directly from the Arduino reference system,

Code (C++)
Select All
strcpy_P(buffer, (char*)pgm_read_word(&(string_table[i]))); 



which is about two-thirds of the way down the page at,

https://www.arduino.cc/en/Reference/PROGMEM.

In Visual Studio the very last, right hand parenthesis of the above code snippet has a little red squiggle under it.  When I put the mouse over the squiggle, an error message is displayed, viz., "Error: expected an expression".

The funny thing is that the code compiles, executes on a UNO and gives the results expected.

Am I missing something here?
« Last Edit: Mar 18th, 2016 at 2:22pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
boandlgramer
Newbies
*
Offline


Posts: 1
Joined: Mar 18th, 2016
Re: Error msg - compiles and executes
Reply #1 - Mar 18th, 2016 at 2:09pm
Print Post  
I ran into the same problem with VS2015/Arduino IDE 1.6.9 Daily Build a few days ago.

I included the avr/pgmspace.h in addition, but this doesn't help.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12138
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense Error msg - compiles and executes OK
Reply #2 - Mar 18th, 2016 at 2:30pm
Print Post  
Not sure how I missed this originally

VS intellisense can't understand some underlying Arduino c++ syntax but we can redefine things if there is a problem.

You can put a dummy prototype in a .h file which is ignored by the compiler and used only for intellisense.

http://www.visualmicro.com/page/Extending-Visual-Studio-Intellisense.aspx

If you can give me an example sketch and tell me which board you are using I could give a better example

  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint