Are you sure, you have write permission to the directory you use ?
It might be helpful to know the full commandline that leads to the error and the exact error-message.
Change "Settings -> Compiler and debugger... -> Global compiler settings -> [the compiler you use] -> Other settings(rightmost tab)" "Compiler logging" to "Full commandline" and post the content of the build log.