I can only speak for myself. But I personally find complimenting someone I don't know to be problematic. First off, every single person is unique and different. As such, they are going to have different reactions and personal boundaries that are unique to them. I suppose that is my problem with complimenting someone you don't know, as it puts someone in a position where they are forced to react to something (and they really had no choice or say in the matter). It's an external force, now entering their space and, is forcing them to have to deal with it. And because you don't know them personally, you don't know what they are like as a person (so you don't know how they would react, or what their personal boundaries are).
That said, I think we can all agree there is a difference between complimenting someone, and sexually harassing them. There is a debate I suppose, on whether the former can be objectifying, but we can all at least agree that there is a line. Telling someone you think their dress is nice etc. is a far cry from "nice tits/ass" or "i would like to see what is under that dress". The obvious is that, these words are aimed at sexualizing someone without their consent.
I don't think it's that hard for someone, to NOT sexually come on to someone when it's not consensual or wanted. And why anyone thinks that it's okay to do so, is well..crazy. Even on a social level, it's bizarre that someone would think this kind of thing is acceptable. I guess my stance is, these people are either completely socially inept, or they have no respect for women, and don't see anything wrong with sexually advancing on them. Either way, I think it's terrible.
Anyways, I'm only making this post to reply to those saying "can't I compliment someone anymore". Well, it really depends on context, the person, and the overall situation. What you say and how you say it. This goes beyond just complimenting someone you find attractive, this kind of rule applies to any kind of social interaction. Apart of being a social creature (as humans are), is learning how to adapt and read situations. Because believe it or not, socializing is complex. But I would say, at the very least you should be able to tell the difference between "nice tits/ass" and "nice dress". I would still say even with the latter, you should be aware that saying such a thing could make someone uncomfortable or be semi-objectifying based on the person.
EDIT: I agree that it's about how you say things too. Posts below me pointed out that even "i like your dress" can come off as harassment based on tone and context. That is 100% true. So I didn't mean for my post to say: this is 100% no harassment whereas THIS IS. I was just giving a general difference between two things that clearly are different. But that said, I agree that even what people assume are non-sexual compliments, can become harassment depending on how they are said. Absolutely.