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....
  • 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
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
Page Index Toggle Pages: 1
Send Topic Print
Include files from different folders (Read 2583 times)
Filipe Morais

Posts: 5
Include files from different folders
Sep 11th, 2014 at 3:14pm
I am currently working on several different projects, which however share some code (serial reading functions, etc...). For that reason, I which to have some .h and .cpp files in a common folder to be included in multiple projects. I realised from other thread that I cannot simply include the folder in the "Additional Include Directories" and use relative paths, so all my #include feature full paths. However, when I get all the includes right it doesn't compile thrashing out what seems like a huge list of random errors. Any idea on why this happens, or is there any other (better?) way to include code files from different folders?
Back to top

Please Register or Login to the Forum to see File Attachments
IP Logged
Visual Micro

Posts: 10706
United Kingdom
Re: Include files from different folders
Reply #1 - Sep 11th, 2014 at 3:17pm
Hi Filipe,

To protect your code Visual Micro will only work with what is supported by Arduino. In this case you need to create a library or libraries then include then using "project>add/import sketch library". Then you will see the required format and can include manually or using the menu item.

So you must do what it says on arduino.cc.

Because we are arduino compatible this means that you can use the arduino.cc/forum for assistance with your arduino code

Back to top
« Last Edit: Sep 11th, 2014 at 3:18pm by Visual Micro »  

Please Register or Login to the Forum to see File Attachments
IP Logged
Page Index Toggle Pages: 1
Send Topic Print