US President Donald Trump took a jibe at Prime Minister Narendra Modi for funding a "library" in Afghanistan , saying it is of no use in the war-torn country as he criticised India and others for not doing enough for the nation's security.In his first Cabinet meeting of the year on Wednesday, Trump asked India, Russia, Pakistan and other neighbouring countries to take responsibility for Afghanistan's security as he defended his push for the US to invest less overseas.Trump reffered to Prime Minister Modi as an example of how world leaders are talking about their contributions that were nowhere near the "billions of dollars" the US was spending.Trump referred to his friendly terms with Modi, but appeared critical of a "library" funded by India in Afghanistan. It was unclear to which "library" project Trump was referring to.India has been actively involved in reconstruction efforts in war-ravaged Afghanistan. It has committed about USD 3 billion in assistance to Afghanistan since US-led forces toppled the Taliban regime after the September 11, 2001 attacks."I could give you an example where I get along very well with India and Prime Minister Modi. But he is constantly telling me, he built a library in Afghanistan. Library! That's like five hours of what we spend (in Afghanistan)," Trump told his cabinet colleagues."And he (Modi) tells me. He is very smart. We are supposed to say, oh thank you for the library. Don't know who's using it (the library) in Afghanistan. But it's one of those things. I don't like being taken advantage of," he said.“I say this, India. (I have) great relationship with Prime Minister Modi. He is a great gentleman and a great man and he's done a fantastic job. He has brought the country together,” he said.Trump drew a comparison between the expenses being borne by the US and other countries in the Afghan peace efforts.Stating that "massively wealthy countries" were using the US to subsidise their own forces, he said, "A country sends us 200 soldiers to Iraq or sends us 100 soldiers from a big country to Syria or to Afghanistan and then they tell me 100 times, 'Oh, we sent you soldiers, we sent you soldiers'.""Why is not Russia there (in Afghanistan, fighting the Taliban)? Why isn't India there? Why isn't Pakistan there? Why are we (US) there? We are 6,000 miles away. But I don't mind. We want to help our people. We want to help other nations," Trump told reporters in response to a question.Asked if India's role in Afghanistan was going to be security related, Trump said, “I think India should be involved in Afghanistan. I mean I'll give you an example. You can talk about our generals. I gave our generals all of the money they wanted, they didn't do such a great job in Afghanistan. They've been fighting in Afghanistan for 19 years."Trump last month moved to cut by half the 14,000-strong force in Afghanistan, calling for less spending overseas.Alluding in Wednesday's remarks to the 1979-1989 Soviet occupation of Afghanistan, Trump said: "Russia used to be the Soviet Union. Afghanistan made it Russia because they went bankrupt fighting in Afghanistan."Without going into details, Trump asserted that he is going to do work out something good in Afghanistan. “We are going to do something that's right. We are talking to the Taliban, we are talking to a lot of different people,” he said.