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 cpp header file grayed out (Read 1651 times)
HATA
Newbies
*
Offline


Posts: 7
Joined: May 8th, 2020
cpp header file grayed out
Aug 3rd, 2023 at 9:10am
Print Post  
Hi
Yesterday, I upgraded the vMicro IDE for VS2022 to version 2023.731.2200.
Subsequently I clicked a button "upgrade to the new intellisense" (I think, because the button disappeared after having clicked it and was replaced by a settings symbol).
Also since yesterday, the header file of my Arduino project is grayed out completely, starting right after the #ifndef statement. I believe this is the result of this upgrade and / or upgrading to the new intellisense.
My project compiles without any issues, but it's very confusing.
Is there a fix for that ? 

I'm working with MS 2011, VS 2022 community version 17.6.5 (up to date) and writing software for an Arduino Nano 33 IoT.

Many thanks in advance
Best regards
  

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


Posts: 2731
Joined: Feb 13th, 2019
Re: cpp header file grayed out
Reply #1 - Aug 3rd, 2023 at 9:20am
Print Post  
Thanks for the report.

Can you give an example of the #ifndef statements you have in your header file which are now greyed out so we can look at this in more detail?
  
Back to top
IP Logged
 
HATA
Newbies
*
Offline


Posts: 7
Joined: May 8th, 2020
Re: cpp header file grayed out
Reply #2 - Aug 3rd, 2023 at 9:49am
Print Post  
Hi
Per your request, this is the structure of my header file:
Code (C++)
Select All
#ifndef _JUSTINA_h
#define _JUSTINA_h

#include "Arduino.h"
#include <SD.h>
#include <SPI.h>
#include <avr/dtostrf.h>

#define J_productName "Justina: JUST an INterpreter for Arduino"
#define J_legalCopyright "Copyright (C) Herwig Taveirne 2021, 2023"
#define J_productVersion "1.0.1"
#define J_buildDate "July 12, 2023"

// class definitions
// .....

#endif
 



Starting at the second line in the code I copied in, everything is grayed out.
The structure of the file itself has not been changed.

Best regards
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Online


Posts: 2731
Joined: Feb 13th, 2019
Re: cpp header file grayed out
Reply #3 - Aug 4th, 2023 at 8:35am
Print Post  
Thanks for the detail around this.

It would seem that _JUSTINA_h has been defined somewhere and not sure why migrating the project would do this at all.

If you highight _JUSTINA_h in the header and F12 to go to the definition what does it show?

If possible can you zip and email us your complete solution so we can investigate this further? (it will of course be kept confidential and removed as soon as the issue is identified)
  
Back to top
IP Logged
 
HATA
Newbies
*
Offline


Posts: 7
Joined: May 8th, 2020
Re: cpp header file grayed out
Reply #4 - Aug 6th, 2023 at 11:54am
Print Post  
Hi 
Your answer contained the hint leading to the solution: apparently the header file was defined twice: once in the main project folder and once in the subfolder 'src' where all my cpp files are located. Only one header file was defined as part of the project, the other was just a copy lingering around. As soon as I removed that one, the header file was shown as it should.
As mentioned, compilation itself was never impacted.
Best regards
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: cpp header file grayed out
Reply #5 - Aug 6th, 2023 at 3:52pm
Print Post  
Thanks for the update. It makes sense now, good to know the new intellisense system detected the issue as it should.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint