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 Problem with library project creation using Arduino 2.0 BUG (Read 1219 times)
zzcrew
Newbies
*
Offline


Posts: 3
Joined: Mar 17th, 2021
Problem with library project creation using Arduino 2.0 BUG
Nov 4th, 2022 at 4:22pm
Print Post  
When creating a library project for anything past arduino ide 2.0 , both the .cpp and .h files need to be in the same place (Root directory of library) or other libraries included in the library project will not resolve. The extension needs to autodetect the version of the arduino IDE and work accordingly when creating the library project. Thanks
  
Back to top
 
IP Logged
 
zzcrew
Newbies
*
Offline


Posts: 3
Joined: Mar 17th, 2021
Re: Problem with library project creation using Arduino 2.0 BUG
Reply #1 - Nov 4th, 2022 at 4:56pm
Print Post  
So basically the header and the c++ file should not be in the src directory, should be in immediate folder of the library
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Problem with library project creation using Arduino 2.0 BUG
Reply #2 - Nov 18th, 2022 at 9:10pm
Print Post  
Sorry we missed this post.

There are two formats for Arduino libraries. Old and new, v1 and v2.

The v1 libraries have source code in the library root + a \utilities sub folder for private library code.

The v2 libraries must have a library.properties text file in the root. The source code in an \src sub folder. There can also be an unlimited number of sub folders to any depth below the src.

The contents of the library.properties should match the arduino library specification.

Both Visual Micro and Arduino work with both types. However, only v2 format libraries can be used as Visual Micro shared library projects (outside of the std arduino library locations).

The Arduino v2 library format has nothing to do with Arduino 2.0, the v2 format has existed for many years.

During compilation, v1 libraries will have a -I include path of the "libraryRoot". v2 will have a -I include of the "libraryRoot\src".

Does this make sense?
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint