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$

1 Answer 1

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$
1
  • $\begingroup$ Ahh i see, i tried this before but i must have been using it wrong. Perfect =) $\endgroup$ Jan 21, 2015 at 1:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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