46 #include <Xyce_config.h>
54 #include <N_DEV_RegisterDevices.h>
61 #include <N_DEV_ExternDevice.h>
64 #ifdef Xyce_NONFREE_MODELS
65 #include <N_DEV_RegisterNonFreeDevices.h>
68 #ifdef Xyce_RAD_MODELS
69 #include <N_DEV_RegisterSandiaDevices.h>
78 static bool initialized =
false;
92 #ifdef Xyce_RAD_MODELS
93 registerSandiaDevices();
96 #ifdef Xyce_NONFREE_MODELS
97 registerNonFreeDevices();
102 void registerDL(
const char *so_path,
const char *function_key = 0);
112 void registerDL(
const char *so_path,
const char *function_key) {
114 void *dl = dlopen(so_path, RTLD_NOW);
116 const char *
error = dlerror();
117 Report::UserError0() <<
"Failed to load plugin " <<
error;
121 std::string s = std::strlen(function_key) ? function_key :
"dl_register";
132 if (std::strlen(function_key)) {
133 Report::UserError0() <<
"Executing dynamic library " << so_path <<
" function " << s <<
"()";
138 #endif // HAVE_DLFCN_H