# Overwrite libraries created by LibraryLink

I'm using Library link on external C files which creates libraries for mathematica to use, but when i modify the source files and try to rebuild the libraries, the new libraries don't overwrite the old ones, meaning that the functionality doesn't change.

Its simple enough get around case by case because if you change the target name, theres nothing to overwrite so a new library is created but at the end of the project i don't want the user to be changing a value every time they run the program.

So is there any way to make the libraries overwrite, or even a way to delete them at the end of the process?

Use LibraryUnload to unload the library before recompiling, so it can be overwritten.
Here's a brief but very useful tutorial on using LibraryLink, which also mentions LibraryUnload: https://mathematica.stackexchange.com/a/8442/12