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 IntelliSence for Library projects (Read 547 times)
Zenra
Junior Member
**
Offline


Posts: 37
Joined: Mar 8th, 2017
IntelliSence for Library projects
Aug 27th, 2024 at 4:16pm
Print Post  
     I am getting back to developing libraries to share across projects and wondering if there is something I can do to get IntelliSense working for the code in the library .h and .cpp files.  I realize that I cannot compile an Arduino Library project directly so I include another project in the same solution with a simple .ino file to test the library code.  The test program and library compile fine, but IntelliSense doesn't recognize any of the standard classes of Arduino defines (see attached screen shot) in either the .h or .pp files containing the library code.  (IntelliSense works fine for the test .ino file.)
  

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


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: IntelliSence for Library projects
Reply #1 - Aug 27th, 2024 at 7:49pm
Print Post  
It is important to provide the information requested in yellow near the top of the page when posting on this forum. 

If you are using shared projects for the library make sure you added a shared project reference to the Arduino project(s). Right click references > add reference > shared project

Otherwise Visual studio does not know what intellisense the shared project should use.
« Last Edit: Aug 27th, 2024 at 7:50pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Zenra
Junior Member
**
Offline


Posts: 37
Joined: Mar 8th, 2017
Re: IntelliSence for Library projects
Reply #2 - Aug 27th, 2024 at 9:06pm
Print Post  
Ugh - I forgot to add the reference.  That's on me and I am sorry to have taken your time for it, but thank you all the same.

Build output is attached - didn't realize it might help since I wasn't compiling the library directly, but will try hard to always include it going forward.
  

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


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: IntelliSence for Library projects
Reply #3 - Aug 27th, 2024 at 9:17pm
Print Post  
Thanks, yes the output has both build and config. The referenced shared projects are listed in it. I'm glad the guess worked  Smiley
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint