Forum > Beginners

permently deleting a second copy of application


Hello, and please help.
I have been developing an application for several years, first in Delphi and now in Lazarus.  It is very large with many forms.  Recently, I wanted to start a new version and created a directory whose name reflected the current date.  I copied the program's main form to that directory with the goal of continuing development of new additional forms there.  I should have known that I was asking for disaster, because that is what has befallen me. Now, each time I try to compile the program under the former version, I get an "Exit 1" message.  I have tried to find out how to cure this and that has been to no avail.  So I tried to delete that new location, but the OS ? will not allow it.  How can I delete this entire folder? Is the "shred" option the one I want to use or is there another way that does not sound so dangerous?  Also is there anything else I can do to revert to my original program"?
Thank you in advance.

John, you did not use a version control system? Then it would be easy, but now I can't provide a viable answer without knowing exactly how you set up your development environment.
It seems that in your case the only option is to remove everything by hand after making a back-up.
Complex projects should be in a version control system like svn or git.

Well, first of all, I would not go deleting anything until you are back to a working system. Renaming might be a good idea.

Next, deleting a directory, moving directories around, renaming directories is a operating system function, you have not mentioned just what your OS is. My guess Windows but you need to confirm.  Maybe outline the directory structure, but no deleting yet !

What you sound like you are doing is quite reasonable but maybe you have missed a few steps or what ever ?


You'll have to give more information.
You said you've copied program's main form in new directory. Only main form or complete project?
Also, you can't compile former version. Can you compile new version? How do you switch between this versions?

Also, write Lazarus and OS version.


Assuming windows.

Make sure your Antivirus is not scanning the new or old  folder, it will probably effect copying of files and the compiling... so exclude the new and old folder. before you copy anything to it.

in the new folder you should have a folder named lib
delete the folder or if you cant; delete the folders with in it, these contain the pre-compiled code for linking.

check that you project is not accessing files from your old folder, go through the Project->Option and check everything.
also check your code for any include files are not using absolute file paths , ie not c:\my_project\super_app\includes\; should use relative file path ie includes\ 

when this is all done, open the new project and RE-bUILD (Run->Clean Up & Build) tick the box for delete and then choose clean up and build , this will re-create the lib folder..

when rebuilding is happening, check the message window to check that its compiling all code from the new folder.

Just some ideas.


[0] Message Index

Go to full version