1
$\begingroup$

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?

$\endgroup$
2
$\begingroup$

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

$\endgroup$
  • $\begingroup$ Ahh i see, i tried this before but i must have been using it wrong. Perfect =) $\endgroup$ – Nicholas Gaffney-Henderson Jan 21 '15 at 1:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.