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 Visual Micro / AtMel Studio and Include Files (Read 524 times)
AmandaM
Newbies
*
Offline


Posts: 2
Joined: Jun 28th, 2015
Visual Micro / AtMel Studio and Include Files
Jun 28th, 2015 at 2:19am
Print Post  
Hello Everyone

I have spent the entire day trying to get to the bottom of my problem but to no avail. 

More Inforamation

I have installed ATMel Studio 6.2 SP2 together with the latest version of Visual Micro but have encountered a major problem. 

If I include Arduino libraries such as wire.h in an *.INO file then everything compiles perfectly. However, if I include wire.h in a cpp or h file then the include cannot be found. This problem is not limited to wire.h but any include file, even ones that I create myself and place in a subdirectory of my project.

I have tried going into project properties and then updating the compiler include directories but this does not work, indeed, my changes seem to get overwritten and revert to default. 

Any idea why my includes are not found? How can I force Visual Micro to see my customised include directories?

Many thanks
Amanda

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Micro / AtMel Studio and Include Files
Reply #1 - Jun 28th, 2015 at 1:51pm
Print Post  
Hi,

This might help.

1)

Arduino allows "Arduino format" libraries to be included in a sketch without supplying an include path. This means Arduino has fixed published locations where it expects to find the libraries and that Visual Micro has to automatically find the lib paths, this is the same way that the Arduino works.

2)

You can include libraries in external cpp/h files but the Arduino rules are that the headers must also be included in the [sketch_name].ino. This is how Arduino and Visual Micro find the correct include paths for the compiler. You don't have to use the libs in the sketch code but you must #include them.

3)

The menu "project>add/import sketch library" can be used to see all installed libs, click one and the correct #includes will be added to your sketch which saves you having to find them and also shows what you have installed.

4)

The "micro explorer>library manager" allows you to easily install new libraries either via auto download (if listed) or via zip

5)

Visual Micro follows the Arduino rules so a search on google for the Arduino solution will always give the answer

Thanks

« Last Edit: Jun 28th, 2015 at 1:51pm by Tim@Visual Micro »  
Back to top
IP Logged
 
AmandaM
Newbies
*
Offline


Posts: 2
Joined: Jun 28th, 2015
Re: Visual Micro / AtMel Studio and Include Files
Reply #2 - Jun 29th, 2015 at 1:14am
Print Post  
Thanks for your help. I am sure that Visual Micro is a great piece of software but I have now opted to use Atmel Studio without the plugin. I have pointed Atmel Studio at my Arduino includes and then set the library path. It is working really well.

Once again, thanks.

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Micro / AtMel Studio and Include Files
Reply #3 - Jun 29th, 2015 at 1:18am
Print Post  
This Topic was moved here from Installation & Troubleshooting [move by] Visual Micro.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint