Josh Hartnett has warned younger actors not to get romantically involved with their co-stars.

The Pearl Harbour, Black Hawk Down and The Virgin Suicides star has been linked to several high-profile women over the years, including Scarlett Johansson, who he worked with on The Black Dahlia, Rihanna, Amanda Seyfried, and the 25-year-old actress thought to be his current flame, Tamsin Egerton.

But asked about his "habit" of dating his co-stars, he told Elle magazine: " I don't recommend it to young actors.

"You can make a lot of enemies in the business that way. But when you work with somebody every day, it's like trial dating.

"You develop a fantasy about them. It doesn't always work out, does it?"

Josh said that he could not air any of his complaints to his friends when he dated famous women.

"Back when I dated a few very beautiful, very famous girls, I said something once - it wasn't really a complaint - and my buddy said, 'Oh my God, my diamond shoes are too tight'," the Penny Dreadful actor said.

Asked whether he had any tips for keeping a girlfriend happy, he added: " Let them be on set whenever they want, with whichever co-star you're working with. Never say the scene is too sensitive. They get very suspicious."