Using the following code you can obtain the Magento compare list link.

Getting the compare list link programmatically
Need help implementing this solution, or still looking for a fix to your Magento problem? Get in touch and I will be happy to help with your project.