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 Definition of "__cplusplus" (intellisense) (Read 2231 times)
Red Baron
Member
***
Offline


Posts: 106
Location: Germany
Joined: Jul 29th, 2015
Definition of "__cplusplus" (intellisense)
Jun 15th, 2020 at 10:34am
Print Post  
Hi,

it seems that there is a problem with the definition of "__cplusplus".

Configuation:
- Microsoft Visual Studio Community 2017, Version 15.9.24
- Microsoft Visual C++ 2017
- Arduino IDE for Visual Studio by Visual Micro 19.0 (1.2020.0518)
- Arduino 1.8.2 (no IDE)
- avr-gcc 7.3.0-atmel3.6.1
- Arduino Uno

Code:
#ifdef __cplusplus

#endif 

Intellisense shows "__cplusplus" to be "199711L".
Searching for the definition gives: defined in "vsarduino.h" with "201103L"
Looking at "vsarduino.h", you will find: #define __cplusplus 201103L

I think "201103L" is the correct value.

How can I correct this? "__cplusplus" should be "201103L" in the .ino file and all includes.


Kind Regards
« Last Edit: Jun 15th, 2020 at 12:43pm by Tim@Visual Micro »  

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Definition of "__cplusplus" (intellisense)
Reply #1 - Jun 15th, 2020 at 12:43pm
Print Post  
I guess you are talking intellisense and not build? I marked you post as (intellisense)

It's being redefined either by vs or the toolchain. It is possible we need to add an #undef before we re-define it.

Please provide the info requested in yellow above so that we can see what you have installed or try this...

Create a vs-intellisense-fix.h in the __vm folder next to the vsarduino.h.

Code
Select All
#undef __cpluplus
#define __cplusplus 201103L
 



If the #undef works let us know we will add to the core.
« Last Edit: Jun 15th, 2020 at 12:44pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2175
Joined: Feb 13th, 2019
Re: Definition of "__cplusplus" (intellisense)
Reply #2 - Jun 15th, 2020 at 5:53pm
Print Post  
We have released an update which should resolve this in intellisense (20.05.18.9), which is available from the board below:

https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

  
Back to top
 
IP Logged
 
Red Baron
Member
***
Offline


Posts: 106
Location: Germany
Joined: Jul 29th, 2015
Re: Definition of "__cplusplus" (intellisense)
Reply #3 - Jun 16th, 2020 at 5:29am
Print Post  
I created vs-intellisense-fix.h
- was not recognized by VS
- I added it manually to the project: No effect.

I downloaded the vsix from them link. Could not be installed. This is the log:

16.06.2020 07:05:36 - Microsoft VSIX Installer
16.06.2020 07:05:36 - -------------------------------------------
16.06.2020 07:05:36 - Initializing Install...
16.06.2020 07:05:36 - Extension Details...
16.06.2020 07:05:36 -      Identifier         : c2b94433-1774-4242-8062-987a4484f1ed
16.06.2020 07:05:36 -      Name               : Arduino IDE for Visual Studio (Visual Micro)
16.06.2020 07:05:36 -      Author             : Visual Micro
16.06.2020 07:05:36 -      Version            : 2020.518.8
16.06.2020 07:05:36 -      Description        : A fully compatible Arduino Edit, Build , Deploy and Debug tool. All Arduino IDE versions are supported. This is an admin install for all users. (optional Arduino debugger and more!). Supports Arduino and all clones (AVR, SAMD, ESP, STM32, Intel, Ti etc.). Supports Hadrware/GDB and Serial debugging of mulitple .ino, cpp files, libraries and core. Teams can split code into shared projects.

NOTE: This extension is upated frequently, please switch off auto-update via 'tools>extensions and updates' if the update prompt annoys you. 

Latest release provides a number of fixes and additions. Please see the 'Release Notes' at www.visualmicro.com

Visual Micro supports many different types of hardware and code libraries. These can be installed manually or using the automated installation tools provided by this extension.
16.06.2020 07:05:36 -      Locale             : en-US
16.06.2020 07:05:36 -      MoreInfoURL        : https://www.visualmicro.com/
16.06.2020 07:05:36 -      InstalledByMSI     : False
16.06.2020 07:05:36 -      SupportedFrameworkVersionRange : [0.0,2147483647.2147483647]
16.06.2020 07:05:36 - 
16.06.2020 07:05:36 -      SignatureState     : Unsigned
16.06.2020 07:05:36 -      Supported Products : 
16.06.2020 07:05:36 -            Microsoft.VisualStudio.Pro
16.06.2020 07:05:36 -                  Version : [15.0.27220,16.99)
16.06.2020 07:05:36 -            Microsoft.VisualStudio.Community
16.06.2020 07:05:36 -                  Version : [15.0.27220,16.99)
16.06.2020 07:05:36 -            Microsoft.VisualStudio.Enterprise
16.06.2020 07:05:36 -                  Version : [15.0.27220,16.99)
16.06.2020 07:05:36 - 
16.06.2020 07:05:36 -      References         : 
16.06.2020 07:05:36 - Signature Details...
16.06.2020 07:05:36 -      Extension is not signed.
16.06.2020 07:05:36 - 
16.06.2020 07:05:36 - Searching for applicable products...
16.06.2020 07:05:37 - Found installed product - Global Location
16.06.2020 07:05:37 - Found installed product - AtmelStudio
16.06.2020 07:05:37 - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
   bei VSIXInstaller.App.InitializeInstall(Boolean isRepairSupported)
   bei VSIXInstaller.App.InitializeInstall()
   bei System.Threading.Tasks.Task.InnerInvoke()
   bei System.Threading.Tasks.Task.Execute()
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2175
Joined: Feb 13th, 2019
Re: Definition of "__cplusplus" (intellisense)
Reply #4 - Jun 16th, 2020 at 8:29am
Print Post  
If you Right Click the VSIX and select Open With > Microsoft Visual Studio Version Selector, this should resolve the issue with the installation of the update.

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