I want to install xcode on vmware image mac os x lion 10.7 .. I went to app store but it won't let me download because it's the latest version which not compatible with lion 10.7 .. I don't have an developer account .. So, is there any way to install an old xcode ?
You should be able to login to Downloads for Apple Developers with your Apple ID. From there, search for "Xcode 4." You should see "Xcode 4.6.3" at the top of the list. It includes the iOS 6.1 SDK and OS X 10.8 SDK. This is the last version of Xcode supported by OS X Lion (10.7.x) and was released on June 13, 2013.
You can get older versions of Xcode in the Developer Center Downloads section you can go through the pages of Xcode related downloads to find the one you're looking for. You may need to log in to access this page.