Reloading a shared c library after been modified?
hi all, i've made a simple shared c library for learning purposes that i call using nativeboost. Now the problem i'm facing it's that after i changed the library i have to close and open the image to get those changes, so the question is there a way to update the library loaded in the image without closing and opening the image? thanks. -- Bernardo E.C. Sent from a cheap desktop computer in South America.
Hello, this is possible but non trivial. I think the easiest way is to bind the C functions to manage C libraries: dlopen, dlsym, dlclose, dlerror. Then you can manually open and close the dynamic libs (dlopen, dlclose) and call the function dynamically loaded with dlsym. dlerror is used for error handling (else you don't know why your call failed). Clement. 2014-10-13 0:49 GMT+02:00 Bernardo Ezequiel Contreras <vonbecmann@gmail.com> :
hi all, i've made a simple shared c library for learning purposes that i call using nativeboost. Now the problem i'm facing it's that after i changed the library i have to close and open the image to get those changes, so the question is there a way to update the library loaded in the image without closing and opening the image?
thanks.
-- Bernardo E.C.
Sent from a cheap desktop computer in South America.
participants (2)
-
Bernardo Ezequiel Contreras -
Clément Bera