Paste the first page of errors, not the last.

I also tried the CONFIG += release option then it created an ".exe" in the release but when i run that exe it terminates giving memory error.
Well, this is a problem with your code and not Qt