Male Friendships

I’m 18f and I don’t know how to be friends with guys. Ever since I was in middle school and I never received any romantic attention from boys, I just learned to take whatever guys gave me as romantic. It’s coming to bite me in the ass because now I can’t be friends with guys without thinking about the romantic possibility, and if I’m not attracted to them, I find no use in talking to them. But it’s also bad because when guys I’m not attracted to talk to me, if they give me enough attention, I’ll start to develop feelings. How do I work on this?