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
intellisense / path issues (Read 302 times)
arclight
Newbies
*
Offline



Posts: 4
intellisense / path issues
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.
Back to top
 

directInclude.jpg (199 KB | 3 )
directInclude.jpg
libInclude.jpg (176 KB | 3 )
libInclude.jpg
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10339
United Kingdom
Re: intellisense / path issues
Reply #1 - 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)

Back to top
 
WWW  
IP Logged
 
arclight
Newbies
*
Offline



Posts: 4
Re: intellisense / path issues
Reply #2 - Mar 9th, 2019 at 12:04pm
 
Thanks! It works!
Back to top
 

fixed.jpg (259 KB | 3 )
fixed.jpg
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print