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 How to create a library project using VS2013 + VM? (Read 4425 times)
Oldrich
Newbies
*
Offline


Posts: 2
Joined: Jan 5th, 2015
How to create a library project using VS2013 + VM?
Jan 5th, 2015 at 1:42pm
Print Post  
How can I create a library project (*.h, *.cpp) using Visual Micro and VS2013 with auto-completion etc.?  In "File / New" there is only "Sketch Project".
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to create a library project using VS2013 + VM?
Reply #1 - Jan 5th, 2015 at 1:50pm
Print Post  
That's a good question we are trying to work out a neater way.

For now create a folder under the sketchbook libraries folder and add an empty .h and .cpp of the same simple name. (or an empty c++ project) 

Then open or create a sketch and add the library as normal. Click the project node in the solution explorer and then "project>show sketch core and library sources"

This will give you short cuts to your library in the solution/project explorer. If you add a library or sources without re-starting the ide then click "Tools>Visual Micro>Reload toolchains" so that Visual Micro reloads your library sources.

You can manually add whatever you like to the solution explorer and your sketch project. Only the files that should be compiled for Arduino will be compiled.

It's not perfect but if you work through these pointers I think you will come up with a way of working that is usable.

Look forward to hearing how you get on, if at all.

Thanks

  
Back to top
IP Logged
 
Oldrich
Newbies
*
Offline


Posts: 2
Joined: Jan 5th, 2015
Re: How to create a library project using VS2013 + VM?
Reply #2 - Jan 15th, 2015 at 6:16am
Print Post  
Hi,

thank you that works perfect. I must admit that without your help I would not be able to make it work Smiley. Some kind of one click solution would be appreciated.

BTW: How can I remove an imported library?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to create a library project using VS2013 + VM?
Reply #3 - Jan 15th, 2015 at 11:16am
Print Post  
Hi,

If I understand the question correctly....

Remove a library from the sketch build by removing the #imports from the sketch.ino

Remove stuff from the solution/project explorer by right clicking the lib folder in the solution explorer and click remove. 

The Visual Studio project/solution is for intellisense purposes only. When the build happens Visual Micro does not look at the project or solution, it does what the Arduino Ide does and looks at the source code in the sketch folder to determine what must be compiled. 

This means that the Visual Studio project and solution are yours to do as you please to make your dev easier.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint