![]() ![]() The IDE uses a very primitive and dumb methodology. Not if you want the header and source files for that library to be copied/compiled. it won't matter that the SoftwareSerial library was not copied/compiled. What you need to do is make sure that the linker knows that it doesn't need to link anything from the SoftwareSerial library.Then. When the SoftwareSerial source file is compiled? No. ![]() Then there is a problem with how you are making the use of SoftwareSerial optional. My problem with that is that i find it very counterintuitive for the user to need to include a second library, It copies files to the build directory based ONLY on the sketch contents. ![]() Is there any way to include a library header in a library even if it is not included in the sketch? (apart from giving the full absolute path) I could then use conditionnal compilation to disable SoftwareSerial support in my library if SoftwareSerial is not included in the sketch. Is there any way (using preprocessor or other) to detect at compile time if SofwtareSerial has been included in the sketch? My question is thus : is there any workaround to fix this? It is ok that a user must include SoftwareSerial if he use it, but if someone want to use my library with HardwareSerial only, he would still need to include SoftwareSerial in the sketch. My problem with that is that i find it very counterintuitive for the user to need to include a second library, because support for SoftwareSerial is optional in my library. I guess that the IDE generates compilation flags (include path) based of the content of the sketch? I noticed that i need to include SoftwareSerial.h inside the sketch, or else i can't include it in my code. ![]() I want to use an arduino library (SoftwareSerial) inside my own library. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |