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 does not name a type (Read 3674 times)
Paolo66
Junior Member
**
Offline


Posts: 10
Joined: Oct 6th, 2013
does not name a type
May 1st, 2016 at 8:22am
Print Post  
I'm experiencing a strange behavior using the latest version of VisualMicro PlugIn for VStudio15 community version.
The operating system is Win10 64Bit PRO freshly installed.
The same sketch is compiled without trouble with Arduino.cc IDE 1.6.8. 

As you can see there is a problem with enum declaration but the referred line num is for a #define, for this look at the attachment

Cry

Thanks in advance for any help.

Compiling debug version of 'SkrewNew' for 'Arduino/Genuino Zero (Programming Port)'
Build folder: o_edbg
SkrewNew.ino:12:1: error: 'enStateFilippo' does not name a type
:enStateFilippo RequestManagement (int iSerialValue)
Error compiling .ino source
  

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


Posts: 12138
Location: United Kingdom
Joined: Apr 10th, 2010
Re: does not name a type
Reply #1 - May 1st, 2016 at 2:55pm
Print Post  
Hi,

There is some new functionality in recent arduino versions that I am implementing at the moment.

The change controls where the automatically generated prototypes are inserted.

Historically they have been inserted prior to the first line of code in the .ino which meant that methods that use types  need the types to be fined in a .h file.

However Visual Micro will not attempt to add a prototype if one already exists therefore you can probably add the prototype yourself ensuring that the type is defined first.

Notice in this example I have added the prototype "enStateFilippo foo(int iSerialValue);" before the method "RequestManagement()" and after the type "enStateFillipo" has been declared.

Code
Select All
#define test123

enum enStateFilippo {
	enIdle, enReset

};
enStateFilippo _StateMachine = enIdle;


enStateFilippo RequestManagement(int iSerialValue);  //manually added prototype, signature must exactly match

enStateFilippo RequestManagement(int iSerialValue)
{

}

void setup()
{


}

void loop()
{


}
 



Finally the reason for the incorrect line numbers if that the error is in the auto generated prototypes which are not displayed in the code. Visual micro should show a better error Smiley
« Last Edit: May 1st, 2016 at 3:03pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Paolo66
Junior Member
**
Offline


Posts: 10
Joined: Oct 6th, 2013
SOLVED !! Re: does not name a type
Reply #2 - May 1st, 2016 at 5:04pm
Print Post  
SOLVED

Thanks very much
Paolo Cheesy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint