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....
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
C++14 and C++17 Intellisense (Read 71 times)
AustinLindquist
Junior Member
**
Offline



Posts: 14
C++14 and C++17 Intellisense
Jan 15th, 2020 at 2:40am
 
Noticed broken intellisense with these enabled. Is there a way to change __cplusplus define in *.vsarduino.h? Would this solve the issue? I've changed manually but it's reverted frequently even with "always re-add header" flag disabled.

Values for reference https://docs.microsoft.com/en-us/cpp/build/reference/zc-cplusplus?view=vs-2019
Back to top
« Last Edit: Jan 15th, 2020 at 2:44am by AustinLindquist »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10739
United Kingdom
Re: C++14 and C++17 Intellisense
Reply #1 - Jan 15th, 2020 at 8:39pm
 
We will have to add it as an option or work it out automatically. Out of interest what hardware are you using and what are you going to change it too?

Currently you have to edit a text file below the visual micro folder. The visual micro folder is shown in tools>options>visual micro>version>assembly.

This is an STM example, you need to change to the folder name that matches your hardware such as \esp32\ or \avr\ etc

In a sub folder: [VmFolder]\Micro Platforms\arduino16x\hardware\stm32\intellisense.code.h

Back to top
« Last Edit: Jan 15th, 2020 at 8:40pm by Visual Micro »  
WWW  
IP Logged
 
AustinLindquist
Junior Member
**
Offline



Posts: 14
Re: C++14 and C++17 Intellisense
Reply #2 - Jan 21st, 2020 at 1:40pm
 
I'm targeting ATSAMD21G18, updated my gcc toolchain and CMSIS libs to play nice. Newer C++ features have some cool compile time stuff I want to take advantage of. I was using C++14 but I've updated to C++17 (which would be 201703L flag).

Thanks!

EDIT: Added the following lines to the top of my file and it's now propagating:
Code:
#undef __cplusplus
#define __cplusplus 201703L

 



It's now working as expected  Smiley
Back to top
« Last Edit: Jan 21st, 2020 at 1:52pm by AustinLindquist »  
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print