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: stray '\' in program (Read 4161 times)
herve
Newbies
*
Offline


Posts: 8
Joined: Oct 10th, 2020
error: stray '\' in program
Oct 10th, 2020 at 5:06pm
Print Post  
Hello,

On Visual Studio 2019 (same problem with VS 2017) and with the last version of visual micro, I get an error very strange I can't resolve by now Sad

"Stray '\' in program" !

As you can see in screenshot attached there is nothing on line 23 ! I also edited the file in a hexa editor to detect eventually strange characters but nothing special !

I have this problem on many .ino files ! this is only an example among other.

Please note also that with the arduino editor the same project compile without any problem !

Could you help me to understand ?

Let me know if you want/need more detail.

Thanks in advance,

Compiling debug version of 'HorlogeNTP' for 'LOLIN(WEMOS) D1 R2 & mini'
 
HorlogeNTP.ino: 23:1: error: stray '\' in program
 
HorlogeNTP.ino: 23:1: error: stray '\' in program
 
HorlogeNTP.ino: 23:34: error: request for member 'iram' in '"\\"', which is of non-class type 'const char [2]
 
HorlogeNTP.ino: 23:44: error: expected unqualified-id before string constant
 
HorlogeNTP.ino: 23:91: error: section attribute not allowed for 'void TimerHandler()
Error compiling project sources
Debug build failed for project 'HorlogeNTP'

  

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


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: error: stray '\' in program
Reply #1 - Oct 10th, 2020 at 5:15pm
Print Post  
Hi

Please try the latest release which is ready for gallery submission. You can find it here

https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

That issue will be related to the prototypes that have to be added during build if they are missing from the .ino code. They are inserted into a temp copy of the code which is why you get a strange location report.
  
Back to top
IP Logged
 
herve
Newbies
*
Offline


Posts: 8
Joined: Oct 10th, 2020
Re: error: stray '\' in program
Reply #2 - Oct 10th, 2020 at 6:23pm
Print Post  
Hello.

I had a good hope, unfortunately no, exactly the same errors after build. Sad

Thanks,

  

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


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: error: stray '\' in program
Reply #3 - Oct 10th, 2020 at 6:27pm
Print Post  
Okay thanks, please follow the guide in yellow above.
  
Back to top
IP Logged
 
herve
Newbies
*
Offline


Posts: 8
Joined: Oct 10th, 2020
Re: error: stray '\' in program
Reply #4 - Oct 10th, 2020 at 7:08pm
Print Post  
Please find required output file attached.

Let me know if I did something wrong in content.

Many thanks.
  

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


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: error: stray '\' in program
Reply #5 - Oct 10th, 2020 at 9:19pm
Print Post  
Thanks, last request please email this file to us along with a link to this thread

Code
Select All
rlogeNTP.cpp 



Thanks
  
Back to top
IP Logged
 
shrimant
Newbies
*
Offline


Posts: 2
Joined: Oct 10th, 2020
Re: error: stray '\' in program
Reply #6 - Oct 11th, 2020 at 10:46am
Print Post  
Exact same issue with me on Visual Studio 2019Ā  on a line which has absolutely no issues at all." stray `\' in program"

Have wasted almost 4-5 days because of this error. So here is what fixed it for me:


Any version after August 2020 has this problem, please fix this issue when possible.
« Last Edit: Oct 11th, 2020 at 10:49am by shrimant »  
Back to top
 
IP Logged
 
herve
Newbies
*
Offline


Posts: 8
Joined: Oct 10th, 2020
Re: error: stray '\' in program
Reply #7 - Oct 11th, 2020 at 11:33am
Print Post  
Thanks shrimant. I'm going to wait the investigation of support  with the current and last version and I will try also this august release in a separate PC/installation. Thanks again.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: error: stray '\' in program
Reply #8 - Oct 11th, 2020 at 1:42pm
Print Post  
Hi,

Thanks for the information and sorry that this problem was introduced last month as a result of "fixing" another issue. There will ne a release over the next day or two that resolves.

Thanks again!
  
Back to top
IP Logged
 
shrimant
Newbies
*
Offline


Posts: 2
Joined: Oct 10th, 2020
Re: error: stray '\' in program
Reply #9 - Oct 12th, 2020 at 2:59am
Print Post  
herve wrote on Oct 11th, 2020 at 11:33am:
Thanks shrimant. I'm going to wait the investigation of supportĀ  with the current and last version and I will try also this august release in a separate PC/installation. Thanks again.


I went thru hell , I re-installed Visual studio and Arduino 3 times, I even reformatted my laptop, little did I doubt that it could be VMicro. Have finally done some productive work after I found out yesterday what was the root cause.

So far so good no issues with the August build. I am a person who keeps everything on Auto-update mode, but seriously would have to think from now on.
  
Back to top
 
IP Logged
 
herve
Newbies
*
Offline


Posts: 8
Joined: Oct 10th, 2020
Re: error: stray '\' in program
Reply #10 - Oct 12th, 2020 at 11:08am
Print Post  
Hello,

To support team : I confirm that works with august release. I did test on another PC to able to investigate this issue and help.

Thanks,

Regards.
  

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


Posts: 2707
Joined: Feb 13th, 2019
Re: error: stray '\' in program
Reply #11 - Oct 12th, 2020 at 11:39am
Print Post  
Thanks for the updates and confirmations, we are currently working on the fix for this and we will update as soon as a release is available with the fix included.
  
Back to top
IP Logged
 
herve
Newbies
*
Offline


Posts: 8
Joined: Oct 10th, 2020
Re: error: stray '\' in program
Reply #12 - Oct 12th, 2020 at 11:54am
Print Post  
Ok, great !

Please note also that all my other projects with the same kind of problem works also with this august release (it's not a isolate resolution). No more problem and compile are fine, as usual !

Let me know if you need additional information from me.

Regards.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2707
Joined: Feb 13th, 2019
Re: error: stray '\' in program
Reply #13 - Oct 12th, 2020 at 3:20pm
Print Post  
We have an update which should resolve this issue (20.09.10.8), available at the top of the below board:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

If there are any issues please let us know, and thanks again to all for the information.
  
Back to top
IP Logged
 
herve
Newbies
*
Offline


Posts: 8
Joined: Oct 10th, 2020
Re: error: stray '\' in program
Reply #14 - Oct 12th, 2020 at 3:43pm
Print Post  
YESS ! It works for me ! Smiley

Many thanks for your support. Great help.

Regards.
« Last Edit: Oct 13th, 2020 at 12:44pm by herve »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint