Preparing by reacting hydrogen halide with a compound which contains hydroxy bonding directly to carbon