A major Renaissance novel about a man who fights imaginary enemies is

The Prince.
Don Quixote.
The Book of the Courtier.
The Divine Comedy.