Is it illegal for a charity to use money allocated to a building fund for general operating purposes?
I am not sure what you mean by “allocated” and who made the allocation. If a donor gave money for the specific purpose of the building fund, a restricted gift, you should get the approval of the donor if you intend to use it for anything else. The President of the Allegheny Health, Education and Research Foundation found out that it was a crime when he used funds given for scholarships and research purposes for the general operating costs of the hospitals before they went into bankruptcy in Pennsylvania. If the donor is not available to give consent, you may need approval from your state Attorney General or a court. If the funds have been allocated by your own Board, you can get the Board to change the purpose.