Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • 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
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Unable to compile in visual micro, identical code and libraries in Arduino IDE compile and run fine (Read 247 times)
RicardoDV
Newbies
*
Offline



Posts: 8
Unable to compile in visual micro, identical code and libraries in Arduino IDE compile and run fine
Dec 12th, 2020 at 7:40pm
 
Hi, I have followed the instructions and attached the output from visual micro and the output from the Arduino IDE along with my full code.  Any pointers will be appreciated. This had been working fine using visual micro.     I have a 3 computer perpetual license installed.  Thanks,
Back to top
 

Please Register or Login to the Forum to see File Attachments
 
IP Logged
 
RicardoDV
Newbies
*
Offline



Posts: 8
Re: Unable to compile in visual micro, identical code and libraries in Arduino IDE compile and run fine
Reply #1 - Dec 12th, 2020 at 7:40pm
 
Here is the complete code.
Back to top
 

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



Posts: 604
Re: Unable to compile in visual micro, identical code and libraries in Arduino IDE compile and run fine
Reply #2 - Dec 14th, 2020 at 11:02am
 
Thanks for the report and detail.

Can you try updating to the latest forum release of Visual Micro (20.09.10.22) from the below board:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

If this still fails with the same code, can you confirm which specific libraries are in use for this project (URLs or Full Library Name in Board Manager)
Back to top
 
 
IP Logged
 
RicardoDV
Newbies
*
Offline



Posts: 8
Re: Unable to compile in visual micro, identical code and libraries in Arduino IDE compile and run fine
Reply #3 - Dec 16th, 2020 at 12:00pm
 
Hi, thanks for the reply.  I just installed the newest forum release and the result is the same, it doesn't compile.  Attached are the libraries I use and the Arduino core board is ESP8266 v 2.7.0
Back to top
 
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline



Posts: 604
Re: Unable to compile in visual micro, identical code and libraries in Arduino IDE compile and run fine
Reply #4 - Dec 16th, 2020 at 2:21pm
 
Sorry, I cannot see an attachment, or has it been sent via email?
Back to top
 
 
IP Logged
 
RicardoDV
Newbies
*
Offline



Posts: 8
Re: Unable to compile in visual micro, identical code and libraries in Arduino IDE compile and run fine
Reply #5 - Dec 17th, 2020 at 12:45am
 
Yes email, sorry.
Back to top
 
 
IP Logged
 
RicardoDV
Newbies
*
Offline



Posts: 8
Re: Unable to compile in visual micro, identical code and libraries in Arduino IDE compile and run fine
Reply #6 - Dec 27th, 2020 at 2:06pm
 
I got this working, but I don't fully understand what is happening.    The first thing I did, was to eliminate passing arguments of a custom struct type I declared to any function ("contactorStationInformation"), I used global variables instead.   In the Arduino IDE, I don't have to do this, it compiles just fine.   Then I got a different error, saying the functions were not declared in this scope.  The only workaround I came up with, is to declare them manually at the beginning of my program.  It compiles just fine now.  I can work with this but is weird that the Arduino IDE can compile without these changes. 

I started new projects on different computers to see if I had the same issues, and I sure did.  Same results, the Arduino IDE can compile the original code, the VS2019 with visual micro needed these changes.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10902
United Kingdom
Re: Unable to compile in visual micro, identical code and libraries in Arduino IDE compile and run fine
Reply #7 - Dec 28th, 2020 at 5:41pm
 
When .ino code is compiled, we have to extract methods from the .ino code and turn them into prototypes that are then inserted into the temp copy of the .ino code prior to build.

The insertion point for the prototypes sounds like it is wrong. It is the most complex area of the build process but usually works well.

We will look at the output you have sent to see what is throwing it out. It is often easier to track these things when debugging is OFF, that also gives direct comparison with the Arduino IDE. If you have not already sent this file please do :-

C:\Users\ricar\AppData\Local\Temp\VMBuilds\Home Automation Base ESP8266\esp8266_nodemcuv2\Debug\Home Automation Base ESP8266.cpp
Back to top
 

Tim Leek
home
WWW  
IP Logged
 
RicardoDV
Newbies
*
Offline



Posts: 8
Re: Unable to compile in visual micro, identical code and libraries in Arduino IDE compile and run fine
Reply #8 - Dec 30th, 2020 at 1:59pm
 
Here is the file.  Thanks,
Back to top
 

Please Register or Login to the Forum to see File Attachments
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print