[erlang-questions] -include with define macro
Mon Sep 21 15:46:34 CEST 2015
Thanks for the info. I will organize the code as you suggested.
On 9/21/2015 2:56 PM, zxq9 wrote:
> On 2015年9月21日 月曜日 14:26:35 Martin Koroudjiev wrote:
>> and to compile the source files as:
>> erlc -Werror -Wall -DCONTAINING_APP_INCLUDE="\"<path>/<file>.hrl\""
>> but I get the following error:
>> badly formed 'include'
> I think includes run before macros, so your include is trying to include a very odd-looking thing that starts with a question-mark instead of a filename.
> Usually things like debug (or other selective behavior definitions) expand to reference a module based on the debug level (or whatever). So ?DEBUG might look like
> in code and one time expand to: `my_logger:report(Foo)` or `my_full_blown_debugger:reort(Foo)` or `my_do_nothing_module:report(Foo)`. In the last case the function might be optimized out entirely if it really does nothing.
> erlang-questions mailing list
More information about the erlang-questions