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 Arduino compiles fine, VM/VS fails with ArduinoJson (Read 1514 times)
Abbott HMG
Junior Member
**
Offline


Posts: 62
Location: Bedford, NY, USA
Joined: May 10th, 2019
Arduino compiles fine, VM/VS fails with ArduinoJson
May 4th, 2024 at 4:17pm
Print Post  
I've included ArduinoJson library into a large sketch. When building with VM in Visual Studio, in configuration.hpp I get the compile error: arduino configuration.hpp C++ function call is not allowed in a constant expression for if __has_include(<string>). Same for istream and ostream.

If I compile using Arduino, it compiles with no errors?
Am I missing a setting?
I've attached a minimal sketch that exhibits the same issue.

Thanks
Abbott  Huh
« Last Edit: May 5th, 2024 at 12:56pm by Abbott HMG »  

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


Posts: 2697
Joined: Feb 13th, 2019
Re: Arduino compiles fine, VM/VS fails with ArduinoJson
Reply #1 - May 7th, 2024 at 10:07am
Print Post  
Thanks for the report and the project/library.

Can you attach the full build output with the options shown at the top of the page for this test project?

We just want to be sure we are replicating the same issue as currently this compiles fine with the ATMega2560 from the AVR 1.8.6 board package and your library.
  
Back to top
IP Logged
 
Abbott HMG
Junior Member
**
Offline


Posts: 62
Location: Bedford, NY, USA
Joined: May 10th, 2019
Re: Arduino compiles fine, VM/VS fails with ArduinoJson
Reply #2 - May 7th, 2024 at 3:19pm
Print Post  
I've included images of the output (which compiles fine) and the Erros list with images of the errors flagged in the source.
Is there a compile error level flag I should change for VM?
Thanks
Abbott
  

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


Posts: 2697
Joined: Feb 13th, 2019
Re: Arduino compiles fine, VM/VS fails with ArduinoJson
Reply #3 - May 7th, 2024 at 3:26pm
Print Post  
Please attach the complete output as a text file, from the Output > Micro Build Window after completing a build.

Without this it is very difficult to understand the environment in use, but it is good to know there are only intellisense issues and no build problems.

The log and your images will allow us to dig deeper into the Intellisense issues once we can replicate them.
« Last Edit: May 7th, 2024 at 3:39pm by Simon@Visual Micro »  
Back to top
IP Logged
 
Abbott HMG
Junior Member
**
Offline


Posts: 62
Location: Bedford, NY, USA
Joined: May 10th, 2019
Re: Arduino compiles fine, VM/VS fails with ArduinoJson
Reply #4 - May 12th, 2024 at 10:34am
Print Post  
Here's the output.
Thanks
  

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


Posts: 2697
Joined: Feb 13th, 2019
Re: Arduino compiles fine, VM/VS fails with ArduinoJson
Reply #5 - May 13th, 2024 at 9:50am
Print Post  
Thanks for the log.

Can you change the build configuration from ARM64 to ARM, then make a small edit to your sketch and save it.

Does this improve the Intellisense error?
  
Back to top
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: Arduino compiles fine, VM/VS fails with ArduinoJson
Reply #6 - May 24th, 2024 at 10:11am
Print Post  
Can you try the latest release (24.0510.01) which can be downloaded from the top of the below board:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

This should improve some of the Intellisense errors you are seeing.  There will still be some errors which we are working on the best way to resolve (e.g. the "new(size_t) functions).
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint