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 #Include a header file at a certain location (Read 4731 times)
Marc Jacobi
Junior Member
**
Offline


Posts: 28
Location: Netherlands
Joined: Feb 28th, 2012
#Include a header file at a certain location
May 11th, 2013 at 9:47am
Print Post  
Hi,

I want to just include a header file that is at a certain location on my file system. I don't want to follow the (Library) rules of the Arduino IDE (if I liked those, I would be using that IDE) and just want to do it how you would normally do it in a (Visual) C++ project.

* Adding an include directory to the project settings does not work for these directories are reinitialized with each build - WHY!?

It shouldn't be hard but I cannot get it to work.
« Last Edit: May 11th, 2013 at 9:48am by Marc Jacobi »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: #Include a header file at a certain location
Reply #1 - May 11th, 2013 at 2:30pm
Print Post  
The C++ includes are not used for compile they are only used to force vs to show the correct intellisense. 

I am actually thinking about how we might allow some C++ propertyies to be used which are then applied to builds but there is a great danger that things will become confusing and prone to support problems for users that do not understand the reasoning. So right now they are entirely ignored.

Obviously as soon as you add your own include paths you will be outside of Arduino compatibility simply because you will not longer be able to compile your sketch using the Arduino IDE. No great loss I know but there is always the chance in the future that vm breaks in which case there will be no interim fall back option.

Having said all that, this has been requested a few times and it would be nice to allow the arduino build process to be further expanded.

Alternative?

How about a semi-colon list of  "Additional Includes" property similar to "Constants - Project" which allows you to specify include paths that are used for both intellisense and compile?

« Last Edit: May 11th, 2013 at 2:31pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Marc Jacobi
Junior Member
**
Offline


Posts: 28
Location: Netherlands
Joined: Feb 28th, 2012
Re: #Include a header file at a certain location
Reply #2 - May 11th, 2013 at 7:59pm
Print Post  
Why not make two project templates. One that is completely Arduino compatible and restricted and one that is advanced and allows customization of all the bells and whistles..?

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: #Include a header file at a certain location
Reply #3 - May 11th, 2013 at 8:55pm
Print Post  
It might be complicated to design the ui to handle this. 

How would users switch between them and clearly know which they are in. 

Maybe just a simple project setting to say use some c++ properties. Which ones would apply?
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint