Gilani made the remarks while interacting with reporters on the sidelines of an official function in Islamabad. "In the past, negotiations were stalled with India but talks were the only way forward," he said.
Pakistan Foreign Minister Khar's upcoming visit to India will provide an opportunity to the two countries to move forward with their negotiations, he said. "In earlier talks, we discussed all core issues, including Kashmir," he said.
Pakistan wants cordial relations with all its neighbours, including Iran, Afghanistan and India, he said.
Gilani added that he had held meetings with Afghanistan President Hamid Karzai and Prime Minister Dr Manmohan Singh to improve relations with the two countries.
Gilani described recent rounds of secretary-level talks between India and Pakistan as a positive development. Dr Singh is a respectable person who wants India's ties with Pakistan to improve, he said.
Pakistan and India had held secretary-level talks on commerce, defence and security issues with an aim to resolve issues, he remarked.
The two countries are tackling issues like poverty, unemployment and price hike and need to invest more in health and education, he said.
Khar is scheduled to leave for New Delhi on Tuesday. She will hold talks with her Indian counterpart S M Krishna on July 27.