- void* handle = dlopen(target_lib.c_str(), RTLD_LAZY | RTLD_LOCAL | WANT_RTLD_DEEPBIND);
- xbt_assert(handle != nullptr, "dlopen of library %s failed: %s (errno: %d -- %s)", target_lib.c_str(),
- dlerror(), errno, strerror(errno));
+
+ std::string sedcommand = "sed -i -e 's/" + libname + "/" + target_libname + "/g' " + target_executable;
+ int status = system(sedcommand.c_str());
+ xbt_assert(status == 0, "error while applying sed command %s \n", sedcommand.c_str());