Donald Trump has hinted he could change his mind on the US pulling out of the international Paris climate change deal.
The French president Emmanuel Macron insisted they will continue to talk about combating global warming.
Despite their sharp differences on a global climate agreement, Trump and Macron have enjoyed a private dinner high above Paris.
Mr Trump and first lady Melania, Mr Macron and his wife, Brigitte, dined at the Eiffel Tower's Jules Verne restaurant.
The meal capped off a day that included a tour of one of Paris's most famous sights, meetings and a joint press conference.
Mr Trump will be honoured on Friday during Bastille Day celebrations.
On Thursday, Mr Trump, standing alongside Mr Macron at a news conference, said the two nations have "occasional disagreements" but that would not disrupt a friendship that dates back to the American Revolution.
He was initially non-committal about the United States eventually rejoining the global climate agreement that bears Paris' name, telling Mr Macron, "if it happens that will be wonderful, and if it doesn't that will be OK too".
Mr Trump said: "Something could happen with respect to the Paris accord, let's see what happens, but we will talk about that over the coming period of time."
Mr Macron acknowledged sharp differences on the Paris climate pact but said the two leaders could find other areas of cooperation. "Should that have an impact on the discussions we're having on all other topics? No, absolutely not," he said.
Mr Trump arrived in the French capital for a whirlwind, 36-hour visit to meet with Mr Macron and tackle potential solutions to the crisis in Syria and discuss broader counter-terrorism strategies before being feted at Bastille Day celebrations on Friday.
While the US has split with the major world powers on the environment, the two leaders tried to patch over those differences.
Mr Trump has said the climate deal was unfair to the US but said the country was committed to protecting the environment despite his recent withdrawal decision.
Mr Macron, a staunch advocate of research to combat global warming, has beckoned "all responsible citizens," including American scientists and researchers, to bring their fight against climate change to France.
Topics such as resolving the years-long civil war in Syria and countering terrorism gave Mr Trump and Mr Macron areas to cooperate. The two said they also discussed the security situations in Ukraine and Libya.
Mr Trump praised a ceasefire in southern Syria that he helped broker last week with Russia and Jordan and said the US was working on a second ceasefire in a "rough part of Syria."
Mr Macron said he discussed with Mr Trump a road map for the country that would help stabilise the situation after the war ends. He has argued for intervention in Syria, saying that President Bashar Assad is a threat to the war-ravaged country and the Islamic State group is a threat to France.
The visit, along with the celebration of French national pride on Bastille Day, was cast by the White House as a commemoration of the US-French military alliance - both then and now.