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 do I create a VM library project from an existing library imported from GIT (Read 1108 times)
Simon181716
Newbies
*
Offline


Posts: 3
Joined: Jul 16th, 2018
How do I create a VM library project from an existing library imported from GIT
Oct 21st, 2023 at 10:57am
Print Post  
I'm using VS 17.7 with the latest VM version 2.2023.1006.  Thanks.
« Last Edit: Oct 21st, 2023 at 10:58am by Simon181716 »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12166
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How do I create a VM library project from an existing library imported from GIT
Reply #1 - Oct 21st, 2023 at 4:51pm
Print Post  
There are a few ways. Do you really need a library project? Using the library in your project code and clicking the vmicro>show/hide hidden files option will give you access to the lib code in the project but without being fixed to a specific set of library files and version.

If you really want a project with the library then ...

If the library is in the standard arduino lib locations then use the advanced feature on the add library menu to enable "create shared project" option. Then click to add the library as normal. Switch the option off again after you use it. Normally you don't want

or Manually add a new "Visual Studio Shared C++" project (.vcxitems) to the library root using the standard Visual Studio File>New>project feature. Ensure the name is the same name as the library folder such as SPI. When you create and add a shared c++ project file to the solution you can use the "show all files" icon to right click include or exclude the sources of the library. You then need to right click the References node of your arduino project(s) and then click "Add Reference". On the add reference window there is a tab on the left side called "Shared Projects". That allows you to select which of the shared projects in the current solution are to be referenced by the arduino code. 

Make sense?

This doc page is due to be updated but shows explains some of this.

https://www.visualmicro.com/post/2017/01/16/Arduino-Cross-Platform-Library-Devel...



  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint