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 Strange error during building phase in Visual Studio (Read 1129 times)
AddyK
Newbies
*
Offline


Posts: 4
Joined: Oct 9th, 2020
Strange error during building phase in Visual Studio
Oct 9th, 2020 at 2:35pm
Print Post  
Since the last update (using now latest version VS and VM) I get a strange error during the final building phase of my project not seen before. It gives the following errors:

----------------------------------
Garden.ino: 98:44: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
   unsigned int minutes = (((((unsigned long)( PickTime )- milliseconds) \ 1000) - seconds) \ 60) % 60
 
Garden.ino: 98:1: error: stray '\' in program
   unsigned int minutes = (((((unsigned long)( PickTime )- milliseconds) \ 1000) - seconds) \ 60) % 60
 
Garden.ino: 98:1: error: stray '\' in program
 
Garden.ino: 98:34: error: request for member 'iram' in '"\\"', which is of non-class type 'const char [2]
   unsigned int minutes = (((((unsigned long)( PickTime )- milliseconds) \ 1000) - seconds) \ 60) % 60
 
Garden.ino: 98:44: error: expected unqualified-id before string constant
   unsigned int minutes = (((((unsigned long)( PickTime )- milliseconds) \ 1000) - seconds) \ 60) % 60
 
Garden.ino: 98:89: error: section attribute not allowed for 'void osWatch()
   unsigned int minutes = (((((unsigned long)( PickTime )- milliseconds) \ 1000) - seconds) \ 60) % 60

------------------------------

VS/VM compiles the project code without any error. Also there are no error indicated in the editor.
If I use Arduino it compiles correctly and builds the bin file. 

Strange is:

Garden.ino: 98:44: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]

because it make no sense at all looking to the code..
So I was wondering if someone experienced the same problem and has a solution for it..
Thanks!
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Strange error during building phase in Visual Studio
Reply #1 - Oct 9th, 2020 at 2:45pm
Print Post  
Thanks for the report.  To help us investigate, can you attach a full build log, with the Verbose and Show Build Properties options set as shown in the box at the top of this page?
  
Back to top
 
IP Logged
 
AddyK
Newbies
*
Offline


Posts: 4
Joined: Oct 9th, 2020
Re: Strange error during building phase in Visual Studio
Reply #2 - Oct 9th, 2020 at 3:14pm
Print Post  
Hi Simon. I attached the log. Let me know if you need more information..

Thanks for looking into it..

Addy
  

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


Posts: 2145
Joined: Feb 13th, 2019
Re: Strange error during building phase in Visual Studio
Reply #3 - Oct 9th, 2020 at 3:36pm
Print Post  
Thanks for the logging, and the line it seems to dislike most is below...
Code
Select All
unsigned int minutes = (((((unsigned long)( PickTime )- milliseconds) \ 1000) - seconds) \ 60) % 60 



Should the '\' not be '/'?
Code
Select All
unsigned int minutes = (((((unsigned long)( PickTime )- milliseconds) / 1000) - seconds) / 60) % 60 

  
Back to top
 
IP Logged
 
AddyK
Newbies
*
Offline


Posts: 4
Joined: Oct 9th, 2020
Re: Strange error during building phase in Visual Studio
Reply #4 - Oct 9th, 2020 at 5:01pm
Print Post  
The strange thing is that the original code is as follows (lines 95..99):

Code
Select All
	unsigned long PickTime = millis();
	unsigned long milliseconds = (unsigned long)( PickTime ) % 1000;
	unsigned int seconds = (((unsigned long)( PickTime )- milliseconds) / 1000) % 60;
	unsigned int minutes = (((((unsigned long)( PickTime )- milliseconds) / 1000) - seconds) / 60) % 60;
	unsigned int hours = ((((((unsigned long)( PickTime )- milliseconds) / 1000) - seconds) / 60) - minutes) / 60; 



So there the slashes are in the right direction (i think)...
  
Back to top
 
IP Logged
 
AddyK
Newbies
*
Offline


Posts: 4
Joined: Oct 9th, 2020
Re: Strange error during building phase in Visual Studio
Reply #5 - Oct 15th, 2020 at 5:31pm
Print Post  
By installing the latest release of Visual Micro the problem was solved.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint