Can we use always block inside `ifdef?

In reply to Abhijitsjadhav:

In reply to sharat:
@sharat, I tried with your way, But I am getting below error,
Verilog HDL error at : can’t resolve reference to object “”

Can you please post the code for which you are getting the error?