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....
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
Creating a new Library (Read 233 times)
Arnd
Newbies
*
Offline



Posts: 3
Europe & Caribbean
Creating a new Library
Feb 17th, 2019 at 9:13am
 
The recommended structure for an Arduino library is:

libname/library.properties
libname/src/library.h
libname/src/library.cpp
libname/examples/example1/example1.ino
libname/examples/example2/example2.ino
libname/examples/example3/example3.ino

I am trying, without success, to have a single VisualMicro solution containing those files/paths so that it can be uploaded with a single click to GitHub (ignoring all the Visual-Studio related files and directories).

When I use the VisualMicro library functionality I get a "libname/libname" directory structure and I cannot get restructure that layout.

Is it possible to make a file and directory layout as shown at the beginning or should I continue to make a separate solution for each of the "example.ino" files?

And thanks for creating this product, I keep on getting reminded of the great functionality every time I revert back to the original IDE.
Back to top
« Last Edit: Feb 17th, 2019 at 9:13am by Arnd »  
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10146
United Kingdom
Re: Creating a new Library
Reply #1 - Feb 17th, 2019 at 3:38pm
 
Hi,

I am not entirely clear how you are configuring your solution. Maybe there is some information that will help or maybe there is some problem I don't understand.

I would create the environment in a single solution as follows. Assume the solution structure is the physical file/folder layout after clicking the "Show all files" mini icon above the solution explorer.

Solution1
c:\Test\MySolution
c:\Test\MySolution\Libs
Shared Library Project
c:\Test\MySolution\Libs\Lib1
c:\Test\MySolution\Libs\Lib1\library.properties
c:\Test\MySolution\Libs\Lib1\src
c:\Test\MySolution\Libs\Lib1\src\Lib1.h
c:\Test\MySolution\Libs\Lib1\src\Examples
c:\Test\MySolution\Libs\Lib1\src\Examples\Example1
c:\Test\MySolution\Libs\Lib1\src\Examples\Example1\Example1.ino
Normal Arduino Project
c:\Test\MySolution\Projects
c:\Test\MySolution\Projects\Project1
c:\Test\MySolution\Projects\Project1\Project1.ino

Q: If you are encountering a build issue in a solution that has both Project1 and Lib1 then please state that is the case. If not please explain what the problem is.

Thanks
Back to top
« Last Edit: Feb 17th, 2019 at 3:39pm by Visual Micro »  
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print