A button is created in the custom object, is there any way to add the button to the page layout of any layout such as Account/Opportunity? I had to add the button to the custom object because the force ide was not including the custom buttons and links created in the account customizations, and so wasnt able to deploy them. Is there any workaround for this?
There are two things wrong with the approach.
1) As mentioned by Marina Martin, custom buttons and links are associated to the object for which they have been created and you can't add them to a different object.
2) You could have used change set to deploy the custom buttons and links along with the page layout to the required org. There was no need to create button on custom objects just for the sake of deployment