我已经为 arduino 开发了一个库,它运行良好。它由两个文件组成,即 .h 和 .cpp。是否可以隐藏我的代码或将其转换为类似 dll 的格式以使其不可读?我想隐藏我的库代码。 谢谢
最佳答案
这仅适用于 Arduino IDE 1.8.6 及更高版本。
您必须将库中的预编译标志设置为 true,然后指向代码的静态编译库。
Arduino 库定义链接。 https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#libraryproperties-file-format
有关如何编译静态库的链接。 https://www.nongnu.org/avr-libc/user-manual/library.html
关于相同内容的 Arduino Github 讨论链接 https://github.com/arduino/Arduino/issues/4336#issuecomment-444267394
关于c++ - 是否可以隐藏 arduino 的库代码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57848737/