A good start for solving such issue is reading and trying to understand the compiler error messages. Often they are helpful. "It fails" isn't a good enough description.
In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks