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 Library Problem (Read 6329 times)
SeanT
Newbies
*
Offline


Posts: 7
Joined: Oct 15th, 2015
Library Problem
Nov 12th, 2015 at 9:51pm
Print Post  
Hi,
I have all of my libraries in place and I can see them in "Add Library/User" menu. I have written a couple of libraries that include other user libraries. when I try to build and upload I get this error saying that the library I included in my library was not found or "In file included from ... fatal error No such file or directory". I can build and upload using Arduino IDE. My board is Teensy 3.2 and I am using VS2015 community + Arduino IDE 1.6.6. Can you please help?
Sean
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Library Problem
Reply #1 - Nov 12th, 2015 at 10:03pm
Print Post  
Hi Sean, 

Normally for arduino you have to #include any required library in master sketch.ino

Arduino 1.6.6 has just released a new way to auto discover "secondary" library includes and we will implement it shortly.

For now, simply #include any libs you want referenced in any code in the sketch.ino

Does this make sense?
  
Back to top
WWW  
IP Logged
 
SeanT
Newbies
*
Offline


Posts: 7
Joined: Oct 15th, 2015
Re: Library Problem
Reply #2 - Nov 13th, 2015 at 2:58am
Print Post  
I include the required libraries in my master sketch and as I said Arduino IDE works fine, it builds and uploads my code and the micro controller runs it without a problem. My libraries include other code in order to do their job, I don't know if I can include all those libraries in my master sketch. For example I include library A.h in my master library to use its functions and classes, and A.cpp includes other libraries to use theirs to do its thing. The builder finds A.h in my main sketch but can not find other libraries that A.cpp includes, like B.h which is also in my library folder. One other thing is that the problem seems to happen with this library. I can include it in my main sketch with no problem but can not include it in my library .cpp .
Sean
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Library Problem
Reply #3 - Nov 13th, 2015 at 12:53pm
Print Post  
Are we talking about normal arduino libraries stored in mysdocuments\arduino\libraries?
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Library Problem
Reply #4 - Nov 13th, 2015 at 1:00pm
Print Post  
Are we talking about normal arduino libraries stored in "mydocuments\arduino\libraries" or under the ide folder?

Please show a screen shot of your project open in visual studio with the solution explorer expanded so I can see your project structure
« Last Edit: Nov 13th, 2015 at 1:02pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
SeanT
Newbies
*
Offline


Posts: 7
Joined: Oct 15th, 2015
Re: Library Problem
Reply #5 - Nov 13th, 2015 at 5:28pm
Print Post  
yes, those libraries are in user\documents\arduino\libraries folder.
Sean
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Library Problem
Reply #6 - Nov 13th, 2015 at 5:31pm
Print Post  
Okay well I explained earlier that it's always been the case that libraries are #included in the main sketch .ino code.

It's only since arduino 1.6.6 that it automatically works out 2nd level libs and behind the scenes if effectively #includes then in the .ino sketch code during compile.

I also explained that this is a new feature not yet in visual Micro.

So have you done as I suggested and ensured that all possible libraries are #included in the .ino sketch code?
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Library Problem
Reply #7 - Nov 25th, 2015 at 11:42am
Print Post  
please switch on "tools>options>visual micro>compiler>show build properties" and also "verbose"

Then build and email the output to info[at]visualmicro.com

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