VS Arduino
Visual Micro >> Installation & Troubleshooting >> intellisense / path issues
https://www.visualmicro.com/forums/YaBB.pl?num=1552109965

Message started by arclight on Mar 9th, 2019 at 5:39am

Title: intellisense / path issues
Post by arclight on Mar 9th, 2019 at 5:39am
Hello -

I'm having trouble getting VS to find libraries and the Arduino installation under some conditions.

Setup: VS2015 on Win 7
Arduino version 1.8.8 installed in C:\Program Files (x86)\Arduino\

Sketchbook location: ....bunch of path \arduino\
Library location: ....bunch of path \arduino\libraries

I've created a simple HardwareSerial pass through class called SerialControl, and located it in ....\arduino\libraries. It shows up with I try to add it via the "user installed" option on the vMicro->Add Library menu.

If I add the source files (SerialControl.cpp, SerialControl.h) to a project directly, everything works.


If I add the library to a project via the menu approach, Intellisense won't be able to find "Arduino.h" from the class files.

directInclude.jpg ( 199 KB | 1 Download )
libInclude.jpg ( 176 KB | 1 Download )

Title: Re: intellisense / path issues
Post by Visual Micro on Mar 9th, 2019 at 11:28am
Hi,

This information is in the readme.txt that is in the SerialControl project

Adding from the menu creates a "c++ shared project" because you have ticked the option for that to happen.

You are reporting that intellisense is failing in your shared project. This is most likely because you have not added a references from the Arduino project to the "Shared project". VS needs the reference for intellisense.

In the Arduino project, right click "References" and you will see the "Shared Project" tab. You will see that you can enable the shared project by clicking the checkbox next to the shared project name (SerialControl)


Title: Re: intellisense / path issues
Post by arclight on Mar 9th, 2019 at 12:04pm
Thanks! It works!
fixed.jpg ( 259 KB | 1 Download )

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.