Hi all,
I'm trying to develop an Arduino Library and I'm having trouble understanding the "Reference" concept and the "Create shared Project" option.
I created a very simple test case:
1. I create a
new Arduino Library Project using the VS "new project" dialog. It is named `reliable_messenger`. Lets say the folder is located under "C:\GitHub\ArduinoDev\library\"
I also set the
"Optional Sketch Book Location" to the root folder of this library (say: "C:\GitHub\ArduinoDev\") . So VisualMicro can discover this library.
2. In the Solution Explorer: I create a
new Arduino Project named `Echo`. This is placed in a new `examples` folder of the library.
3. With the new
Echo.ino opened, I click on the "Add Library" button and I select `reliable_messenger`. The option "
Create Shared Project when Including Libraries" is not selected. A new line is automatically added :
#include <reliable_messenger.h>
4. I am able to compile Echo.ino. This is good. But when I want to start programming the library:
reliable_messenger.h and
reliable_messenger.cpp I do not get any IntelliSense or Arduino reference.
5. I follow the tutorial
https://www.visualmicro.com/page/User-Guide.aspx?doc=Add-Libraries.html and performed the following:
6. I navigated in the Solution Explorer, under the project Echo, Under Reference, I right clicked and selected the `reliable_messenger` project as reference.
7. Now IntelliSense is working in
reliable_messenger.h but the project
Echo.ino will not compile.
Compiling 'Echo' for 'Arduino/Genuino Uno'
Build Folder: "file:///C:/Users/leungp/AppData/Local/Temp/VMBuilds/Echo/uno/Debug"
Object reference not set to an instance of an object
An error was encountered during the 'Deep Search' library discovery process.
Build failed for project 'Echo'