What tools produce C code that does not produce errors when you try to recompile it again? Can Hex-Rays decompiler convert everything to project files in a single folder and just compile it?
The primary purpose of decompilation is not to produce code that is compiled back with no errors, but rather recover logical flow of a binary. Hex-Ras Decompiler comes with its own set of limitation noted in Hex-Rays Decompiler Manual, to mention few:
Below are the most important limitations of our decompilers (all processors): * exception handling is not supported * type recovery is not performed * global program analysis is not performed