我正在构建一个商业应用程序,我们正在使用一些GPL代码来帮助我们.
我如何添加#warning或#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
Run Code Online (Sandbox Code Playgroud)
在文件的开头,但我可以做得更好吗?如果包含文件,是否有更好的标记文件的方法?
我正在使用带有gcc或clang的Objective-C++.