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 C/C++ language keeps changing (Read 1008 times)
My Screen Name
Junior Member
**
Offline


Posts: 13
Joined: Nov 7th, 2023
C/C++ language keeps changing
May 5th, 2024 at 6:35am
Print Post  
Hi,

I've got a problem that I think is related to Visual Micro but I can't be sure.

In the properties of my project I have set under C/C++ the Languages to C11 and C++ 17.

Now for some reason after X time intellisense starts to bark and point out 'errors' that are suddenly there because the languages have reverted back to C99 and C++ 11. And then I have to change it again.

I have no idea why this keeps happening. Anyone?

Oh, I'm using VS2022 CE, completely up-to-date.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2708
Joined: Feb 13th, 2019
Re: C/C++ language keeps changing
Reply #1 - May 7th, 2024 at 9:59am
Print Post  
Thanks for the report.

Visual Micro does set the Language properties for the project, based on the properties used in the compilation patterns for the board in use.

If you attach the full build output with the properties enabled as shown at the top of the page we can see and show which properties are being used, and if desired these can be overridden to alter it for both Intellisense and Compilation.
  
Back to top
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2708
Joined: Feb 13th, 2019
Re: C/C++ language keeps changing
Reply #2 - May 20th, 2024 at 11:40am
Print Post  
Thanks for sending the build log over.

To achieve the desired settings, the platform.txt will need to be edited in the board package folder:

1) The compiler.c.flags.esp32 command contains -std=gnu99 which can be changed to -std=gnu11.
2) The compiler.cpp.flags.esp32 command contains -std=gnu++11 which can be changed to -std=gnu++17.
3) Once saved, use the vMicro > General > Rescan Toolchains and Libraries to reload the new configuration, or restart VS.

NOTE: There may be issues (Intellisense and/or compilation) changing these from what Espressif have published the package with.  We use the same Intellisense settings as the compiler to ensure it is as accurate and correct as possible.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint