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 files from different folders (Read 3548 times)
Filipe Morais
Newbies
*
Offline


Posts: 5
Joined: Sep 11th, 2014
Include files from different folders
Sep 11th, 2014 at 2:14pm
Print Post  
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
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Include files from different folders
Reply #1 - Sep 11th, 2014 at 2:17pm
Print Post  
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

Thanks
« Last Edit: Sep 11th, 2014 at 2:18pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint