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 Sketch compiles in Arduino, but not Visual Micro (Read 2580 times)
Al B
Newbies
*
Offline


Posts: 4
Joined: May 20th, 2015
Sketch compiles in Arduino, but not Visual Micro
Jul 18th, 2018 at 2:13pm
Print Post  
I'm trying to compile Sonoff-Tasmota 6.1.1b (https://github.com/arendst/Sonoff-Tasmota/archive/development.zip) in Visual Micro (18.07.8.0), but I keep getting errors.  The same sketch compiles without error with Arduino IDE 1.8.5. Also older versions of Sonoff-Tasmota 5.x compile just fine under Visual Micro.

Compiling 'sonoff' for 'Generic ESP8266 Module' 
 
sonoff.ino: 170:1: error: expected unqualified-id before 'else
   uint8_t multipress[MAX_KEYS] = { 0 };       \\ Number of button presses within multiwindow
 
sonoff.ino: 171:1: error: expected unqualified-id before 'else
   uint8_t lastwallswitch[MAX_SWITCHES];       \\ Last wall switch states
 
sonoff.ino: 420:1: error: expected unqualified-id before 'else
 
sonoff.ino: 435:1: error: expected unqualified-id before 'else
   fallback_topic_flag = (strstr(topicBuf, mqtt_client) != NULL)
 
sonoff.ino: 596:1: error: expected unqualified-id before 'else
   * 3 = Set relays to last saved state after power on
 
sonoff.ino: 791:1: error: expected unqualified-id before 'else
   snprintf_P(stemp1, sizeof(stemp1), kModules[i].name)
Error compiling project sources
Build failed for project 'sonoff'


Any suggestions?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Sketch compiles in Arduino, but not Visual Micro
Reply #1 - Jul 18th, 2018 at 7:45pm
Print Post  
Thanks for the report.

There are a few issues.

1) Takes a long time to open large projects for the first time (fixed in next release)

2) The sonoff project replies heavily on a new function in arduino to auto generated prototypes in .ino files. This is due to be implemented in visual micro over the next few weeks.

3) The older system to determine prototypes is getting confused on 6 lines of .ino code and adding incorrect protoypes causing the strange error messages. This will be resolved by implementing 2) above


In the meantime there is an option in the arduino ide "file>preferences>external editor" which enables the project to be open in both visual micro and arduino at the same time. When you click build in arduino it will re-read any changes you have made (and saved) in vs.

Thanks again, it's an impressive project!
  
Back to top
WWW  
IP Logged
 
Al B
Newbies
*
Offline


Posts: 4
Joined: May 20th, 2015
Re: Sketch compiles in Arduino, but not Visual Micro
Reply #2 - Jul 18th, 2018 at 7:52pm
Print Post  
Thanks for looking into this so quickly.  I'll give the work around a shot.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Sketch compiles in Arduino, but not Visual Micro
Reply #3 - Jul 18th, 2018 at 10:37pm
Print Post  
In the end the fix was quite simple 

Please try the latest release which is here:-

https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
  
Back to top
WWW  
IP Logged
 
Al B
Newbies
*
Offline


Posts: 4
Joined: May 20th, 2015
Re: Sketch compiles in Arduino, but not Visual Micro
Reply #4 - Jul 24th, 2018 at 1:23am
Print Post  
Works great.  Thanks for the quick turnaround.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: Sketch compiles in Arduino, but not Visual Micro
Reply #5 - Apr 9th, 2020 at 6:58am
Print Post  
Off-Topic replies have been moved to this Topic.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint