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 How to remove references to libraries (Read 2211 times)
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
How to remove references to libraries
Jul 12th, 2018 at 5:05am
Print Post  
The compiler is including several library references that are not in the code. For example, IRRemote.h and Servo.h appear in my code like this:

Code (C++)
Select All
#if PROCESS_IR_COMMANDS
#include <IRremoteInt.h>
#include <IRremote.h>
#include <BJInputHandlerIR.h>
#endif 



PROCESS_IR_COMMANDS is #defined as false, so these libraries should not be included because this code doesn't get compiled. 

Here is a partial listing of the compiler output:

Code (C++)
Select All
Sketch Include Paths
Core Include Paths
Include Path "file:///D:/Arduino/hardware/arduino/avr/cores/arduino"
Include Path "file:///D:/Arduino/hardware/arduino/avr/variants/eightanaloginputs"
Merged 1 shared c++ projects ...
    D:\Documents\Arduino\libraries\QueueList
Library Include Paths (21)
Include Path 'D:\Documents\Arduino\libraries\QueueList'
Include Path 'D:\Documents\Arduino\libraries\BJMemory'
Include Path 'D:\Documents\Arduino\libraries\BJBufferManager\src'
Include Path 'D:\Documents\Arduino\libraries\BJCommands\src'
Include Path 'D:\Documents\Arduino\libraries\ArduinoBoardTypes'
Include Path 'D:\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src'
Include Path 'D:\Documents\Arduino\libraries\BJInputHandlerSerial\src'
Include Path 'D:\Documents\Arduino\libraries\BJInputHandlerWired\src'
Include Path 'D:\Documents\Arduino\libraries\BJInputHandlerBluetooth\src'
Include Path 'D:\Documents\Arduino\libraries\IRremote'  <--- NO
Include Path 'D:\Documents\Arduino\libraries\BJInputHandlerIR\src' <--- NO
Include Path 'D:\Arduino\hardware\arduino\avr\libraries\SPI\src'
Include Path 'D:\Documents\Arduino\libraries\BJGenericMotorDriver\src'
Include Path 'D:\Documents\Arduino\libraries\BJL9110_Motor\src'
Include Path 'D:\Documents\Arduino\libraries\BJBuzzer\src' <--- NO
Include Path 'D:\Documents\Arduino\libraries\Servo\src'    <--- NO
Include Path 'D:\Documents\Arduino\libraries\TimerOne'    <--- NO
Include Path 'D:\Documents\Arduino\libraries\BJMotorInterruptHandlers'
Include Path 'D:\Documents\Arduino\libraries\RF24-master'
Include Path 'D:\Documents\Arduino\libraries\BJInputHandlerWiFi\src'
 



I have tried cleaning the solution and even deleting the files from AppData, but it seems like the solution has the memory of an elephant. 

How do I get rid of these references?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to remove references to libraries
Reply #1 - Jul 12th, 2018 at 11:22am
Print Post  
This means that you have switched off "vMicro>Compiler>Deep Search for Libraries"

The deep search system uses Gcc-E to discover #includes from the actual code. Without Deep search we revert to the older much cruder but faster Arduino way of establishing libraries using a regex on the .ino code.

The older method can not distinguish conditional #includes 

  
Back to top
WWW  
IP Logged
 
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
Re: How to remove references to libraries
Reply #2 - Jul 12th, 2018 at 8:38pm
Print Post  
Thanks, Tim. I was sure I could count on you to have an answer by the time I woke up. And that solved the problem.

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