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 VS2022 compilation errors (Read 1648 times)
Kabron
Full Member
***
Offline


Posts: 170
Joined: Nov 1st, 2015
VS2022 compilation errors
Mar 2nd, 2023 at 11:36am
Print Post  
Hello,
The project from:
https://github.com/collin80/ESP32RET
successfully compiled by Arduino 2.04
but did not with VM.
Both compilation logs attached.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Kabron
Full Member
***
Offline


Posts: 170
Joined: Nov 1st, 2015
Re: VS2022 compilation errors
Reply #1 - Mar 2nd, 2023 at 12:15pm
Print Post  
Seems Options/Visual Micro/Compiler/Warnings false
solved the problem
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2377
Joined: Feb 13th, 2019
Re: VS2022 compilation errors
Reply #2 - Mar 2nd, 2023 at 1:41pm
Print Post  
Thanks for the report and the solution.

From the logs it seems that the solution matches what you had configured in the Arduino IDE.

Can you confirm in the Arduino IDE you get the same issue when you enable Prefererences > Compiler Warnings > All?
  
Back to top
 
IP Logged
 
Kabron
Full Member
***
Offline


Posts: 170
Joined: Nov 1st, 2015
Re: VS2022 compilation errors
Reply #3 - Mar 2nd, 2023 at 4:15pm
Print Post  
Simon@Visual Micro wrote on Mar 2nd, 2023 at 1:41pm:

Can you confirm in the Arduino IDE you get the same issue when you enable Prefererences > Compiler Warnings > All?

No, this does not affect on Arduino compilation result.
« Last Edit: Mar 2nd, 2023 at 4:16pm by Kabron »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2377
Joined: Feb 13th, 2019
Re: VS2022 compilation errors
Reply #4 - Mar 2nd, 2023 at 4:33pm
Print Post  
Thanks, can you attach the output from that compilation in the Arduino IDE with the Prefererences > Compiler Warnings > All enabled?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12137
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VS2022 compilation errors
Reply #5 - Mar 2nd, 2023 at 5:56pm
Print Post  
We looked into this. It does affect the Arduino IDE result when you enable warnings in Arduino IDE > File>Prefeences. This works the same in both Visual Micro and the Arduino IDE.

It is the ESP32 platform that defines the way warnings and errors are handled.

To resolve, in Visual Micro you can override as follows:-

Add aa local board.txt file to the project using the "vMicro>Add Code>Local Board.txt" or via windows explorer. 

Redefine the warnings_flags.more= property by adding this line to the board.txt

Code
Select All
 compiler.warning_flags.more=-Wall  



Summary

The default for the esp32 uses the  -Werror=all switch which causes warnings to become errors.

compiler.warning_flags.more=-Wall -Werror=all



  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint