Synthesis of semiconductor nanowires by annealing