Alternatively, the acid may first be converted into an alkali metal salt, such as the sodium, potassium or lithium salt, and reacted with an alkyl halide that also contains a protected hydroxyl group in a polar solvent, such as DMF, to produce the ester.