Why can the attribute ‘-compile().’ be defined anywhere in the module but not the attribute ‘-export().’
I don’t want to use -compile(export_all).
in the following code. Export all functions because an error occurs when WINDOWS macros do not take effect
-module(some_mod).
-export([handle_c2s/2]).
handle_c2s(Arg,A) ->
xxx_mod:a_xxx(Arg,A);
handle_c2s(Arg,B) ->
xxx_mod:b_xxx(Arg,B);
...
handle_c2s(Arg,N) ->
xxx_mod:n_xxx(Arg,N).
% TEST
-ifned(WINDOWS).
-export([test_a/2,test_b/2,... test_n/2]).
test(Arg,A) ->
xxx_mod:a_test(Arg,A);
test(Arg,B) ->
xxx_mod:b_test(Arg,B);
...
test(A,N) ->
xxx_mod:n_test(A,N).
-endif.