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 path resolver fails (Read 3464 times)
avluis
Newbies
*
Offline


Posts: 3
Location: Clarksville, TN
Joined: Mar 2nd, 2014
Library path resolver fails
Oct 17th, 2016 at 6:58pm
Print Post  
Hey there.
I have a project that I have started using VS Micro in order to clean-up/organize.
Please take a look at Helper.cpp, in particular the `EEPROM.h` include -- I've noticed that in order for VS Micro to compile; I either have to include that library as a relative path: `EEPROM\src\EEPROM.h` or include it on my .ino file (which will give an unused warning).
If I were to open the project with Arduino, it will find and compile with no issue (as it is able to find `EEPROM.h` with no trouble).

Is there a configuration change or a workaround that I can use to assist VS Micro to find this library while not introducing the unused warning and all while allowing Arduino to compile without changes to that include?
« Last Edit: Oct 17th, 2016 at 7:00pm by avluis »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12138
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Library path resolver fails
Reply #1 - Oct 17th, 2016 at 7:38pm
Print Post  
Hi,

The automatic library discovery seems to fail unless headers are included in .h files

I added the #include to your Helper.h and then it compiled correctly.

It seems that the code still compiles with need to #include ""EEPROM.h"

I need to try the arduino ide to see if it performs the same way.

extract from helper.cpp

Code
Select All
#ifndef _HELPER_h
#define _HELPER_h

#if defined(ARDUINO) && ARDUINO >= 100
	#include "arduino.h"
#else
	#include "WProgram.h"
#endif

#include "EEPROM.h" 



As an aside I notice the debug compile failed because you have added setup(void) and loop(void) prototypes. You can remove the prototypes but a release due shortly also fixes the issue.

void setup(void);
void loop(void);
« Last Edit: Oct 17th, 2016 at 8:20pm by Tim@Visual Micro »  
Back to top
IP Logged
 
avluis
Newbies
*
Offline


Posts: 3
Location: Clarksville, TN
Joined: Mar 2nd, 2014
Re: Library path resolver fails
Reply #2 - Oct 20th, 2016 at 3:21pm
Print Post  
Thank you for the response -- will give your suggestions a try~
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12138
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Library path resolver fails
Reply #3 - Oct 23rd, 2016 at 4:45am
Print Post  
The new release in the gallery fixes both issues without need for code changes.

Libraries were not being discovered from the .cpp files of the project as they should have been.

Adding prototypes for the built in arduino setup and loop methods no longer causes debug compile issues.

Thanks for the report.
  
Back to top
IP Logged
 
avluis
Newbies
*
Offline


Posts: 3
Location: Clarksville, TN
Joined: Mar 2nd, 2014
Re: Library path resolver fails
Reply #4 - Oct 28th, 2016 at 12:26am
Print Post  
Yay!! Thank you~
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint