The reaction may also be carried out by reacting a carboxylic acid with a halogenating agent such as thionyl chloride, oxalyl chloride, phosphorus oxychloride, etc. to convert the acid into a reactive derivative such as an acid halide and then reacting the reactive derivative with a primary or secondary amine.