我正在构建一个商业应用程序,我们正在使用一些 GPL 代码来帮助我们。
如何添加#warning
or#error
语句,以便在为调试而构建代码时发出警告,但是当我们为发布而构建代码时会引发错误?
我可以:
#warning this code is released under a CCL licensing scheme, see Source_Code_License.rtf
#warning this code is not LGPL-compliant
#warning this code was copied verbatim from a GP Licensed file
在文件的开头,但我能做得更好吗?如果包含文件,是否有更好的方法来标记文件?
我正在使用带有 gcc 或 clang 的 Objective-C++。