Something I was reading the other day quoted Claire Messud as saying (and I have to paraphrase, because I don't remember where I saw this and Google is not being helpful) that she doesn't believe in making characters appealing, because real people are unappealing -- we just tend to hide our less pleasant characteristics.
That's been rolling around in my head for days now. I'm not sure I agree -- I find plenty of people appealing, even people I know pretty well -- but then again, I object to the idea that a character has to be someone you'd want for a close friend. (Similarly, I don't think a good president is necessarily someone you'd want to have a beer with.) Hans Castorp is quite a sad sack whiny pants, but that makes the ending of The Magic Mountain all the more shocking and moving.
But I do think that the writer has to like his characters -- flaws and all. (And I'm talking about main characters in literary fiction -- not thrillers!) When an author despises or looks down on his characters, it leaves pretty much no opportunity for the reader to connect with them. And a good writer, I think, ought to be able to make the most horrible characters perversely appealing.