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 Examples in local libraries? (Read 1081 times)
NF1Z
Junior Member
**
Offline


Posts: 49
Joined: Aug 18th, 2013
Examples in local libraries?
Feb 12th, 2019 at 5:18pm
Print Post  
Hi Tim,
I have a project I have been developing for several years now,  with several builds that share some code.  I was using Arduino libraries, but it seemed to me a better solution in my situation would be local libraries.  I recently made a couple of small changes to a library and wanted to check it with a previous example sketch I had written for that purpose.  I found that the example sketch, now moved to:
<sketchbook>\<sketch>\_micro-api\libraries\<lib>\Examples\demo\ demo.ino

compiles but gives me the following linker errors:

ccPch99Z.ltrans0.ltrans.o*: In function main
main.cpp:43: undefined reference to setup
main.cpp:46: undefined reference to loop

The same sketch in the original location:
<sketchbook>\libraries\<lib>\Examples\demo\ demo.ino

compiles and runs fine.  The contents of the two locations (i.e., below _micro-api\libraries and below the sketchbook libraries folder ) are identical, and of course there are loop() and setup() functions.

I can send you further info, but before that, is there a simple answer - like "not supported", or some project setting?  I can't immediately see any reason why this doesn't work, so suggestions welcomed.

Regards,
Jed
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Examples in local libraries?
Reply #1 - Feb 12th, 2019 at 7:07pm
Print Post  
I would recommend using shared projects instead of local libraries. This allows the library to exists outside of another project folder. each examples below shared libraries can then be opened as projects in the solution explorer.

Solution Folder
Projects\Project1
Libraries\Library1
Libraries\Library1\Examples\Example1Project1

Alternatively shared projects can of course also point to a library in the normal sketchbook\libraries folder which would make it easier for other projects to also use the library without need to configure the shared project reference.

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