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 Cant work Scetch from Arduino IDE in VisualMicro+AtmelStudio (Read 2491 times)
Dmitriy Konopinskiy
Newbies
*
Offline


Posts: 3
Joined: Jan 13th, 2016
Cant work Scetch from Arduino IDE in VisualMicro+AtmelStudio
Aug 21st, 2016 at 11:32am
Print Post  
Cant work Sketch from Arduino IDE in VisualMicro+AtmelStudio7
Sketch is work in Arduino IDE
Consol:
Code (C++)
Select All
_22.08.16_Time.ino:8:1: error: 'MyTime' does not name a type
:MyTime Convert_TimeToMyTime(const Time &TIME)
_22.08.16_Time.ino:48:25: error: 'MyTime' does not name a type
:void WriteOnTablo(const MyTime &T)
_22.08.16_Time.ino:48:33: error: ISO C++ forbids declaration of 'T' with no type [-fpermissive]
:void WriteOnTablo(const MyTime &T)
_22.08.16_Time.ino:231:1: error: qualifiers can only be specified for objects and functions
_22.08.16_Time.ino:In function 'void loop()
_22.08.16_Time.ino:643:24: error: invalid initialization of reference of type 'const int&' from expression of type 'MyTime
:WriteOnTablo(TIME_Timer)
_22.08.16_Time.ino:48:6: error: in passing argument 1 of 'void WriteOnTablo(const int&)
:void WriteOnTablo(const MyTime &T)
_22.08.16_Time.ino:646:40: error: invalid initialization of reference of type 'const int&' from expression of type 'MyTime
:WriteOnTablo(Convert_TimeToMyTime(TIME))
_22.08.16_Time.ino:48:6: error: in passing argument 1 of 'void WriteOnTablo(const int&)
:void WriteOnTablo(const MyTime &T)
Error compiling project sources 

  

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: Cant work Scetch from Arduino IDE in VisualMicro+AtmelStudio
Reply #1 - Aug 21st, 2016 at 9:18pm
Print Post  
see if this makes sense? ...

a recent addition to the arduino ide is to be more accurate with the insertion of c++ prototypes. This change is planned for visual micro in the next month or so.

the problem is probably that prototypes are being inserted prior to their creation or after first use

However, you can control where the prototypes are inserted which should work around the problem. If you insert a prototype with exact same signature as the corresponding method then visual micro will not attempt to insert the prototype.

for example, I have added a prototype below for your method "WriteOnTablo" and also for "Convert_TimeToMyTime", which makes use of a user defined MyTime type which was defined earlier in the same .ino file.

The code might be easier to read if I split it into the following order but I am just trying to explain the sequence for c++ prototypes (which you might know)

Code (C++)
Select All
//
// 1. define types
//
//
const struct MyTime
{
  uint8_t hour;
  uint8_t min;
  uint8_t sec;
  uint8_t date;
  uint8_t mon;
  uint16_t year;
  uint8_t dow;
};


// 2. method prototypes
//
//
MyTime Convert_TimeToMyTime(const Time &TIME);
void WriteOnTablo(const MyTime &T);


// 3. methods
//
//
MyTime Convert_TimeToMyTime(const Time &TIME)
{ 
  MyTime T;
  T.hour = TIME.hour;
  T.min = TIME.min;
  T.sec = TIME.sec;
  T.date = TIME.date;
  T.mon = TIME.mon;
  T.year = TIME.year;
  T.dow = TIME.dow;
  return T;
}

///TABLO///START///////////////////////////////////////////////////////////
void WriteOnTablo(const MyTime &T)
{
...
}

 


« Last Edit: Aug 21st, 2016 at 9:25pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint