30 if (!
dll_handle) { printf(
"Error while loading library %s. Error code %i\n", libname.c_str(), GetLastError());
m_reader =
nullptr;
return; }
31 typedef Reader* (__stdcall *f_funci)(std::shared_ptr<std::istream> stream);
32 f_funci newReader = (f_funci)GetProcAddress((HINSTANCE)(
dll_handle), newreader.c_str());
33 if (!newReader) { printf(
"Error while loading function %s from library %s. Error code %i\n", newreader.c_str(), libname.c_str(), GetLastError());
m_reader =
nullptr;
return; }
37#if defined(__linux__) || defined(__darwin__) || defined(__APPLE__) || defined(BSD) || defined(__sun)
38 dll_handle = dlopen(libname.c_str(), RTLD_LAZY | RTLD_GLOBAL);
39 if (!
dll_handle) { printf(
"Error while loading library %s: %s\n", libname.c_str(), dlerror());
m_reader =
nullptr;
return; }
40 using f_funci =
Reader *(*)(std::shared_ptr<std::istream>);
41 auto newReader = (f_funci)dlsym(
dll_handle, newreader.c_str());
42 if (!newReader) { printf(
"Error while loading function %s from library %s: %s\n", newreader.c_str(), libname.c_str(), dlerror());
m_reader =
nullptr;
return; }
50 if (!
dll_handle) { printf(
"Error while loading library %s. Error code %i\n", libname.c_str(), GetLastError());
m_reader =
nullptr;
return; }
51 typedef Reader* (__stdcall *f_funci)(std::istream & stream);
52 f_funci newReader = (f_funci)GetProcAddress((HINSTANCE)(
dll_handle), newreader.c_str());
53 if (!newReader) { printf(
"Error while loading function %s from library %s. Error code %i\n", newreader.c_str(), libname.c_str(), GetLastError());
m_reader =
nullptr;
return; }
57#if defined(__linux__) || defined(__darwin__) || defined(__APPLE__) || defined(BSD) || defined(__sun)
58 dll_handle = dlopen(libname.c_str(), RTLD_LAZY | RTLD_GLOBAL);
59 if (!
dll_handle) { printf(
"Error while loading library %s: %s\n", libname.c_str(), dlerror());
m_reader =
nullptr;
return; }
60 using f_funci =
Reader *(*)(std::istream &);
61 auto newReader = (f_funci)dlsym(
dll_handle, newreader.c_str());
62 if (!newReader) { printf(
"Error while loading function %s from library %s: %s\n", newreader.c_str(), libname.c_str(), dlerror());
m_reader =
nullptr;
return; }
70 if (!
dll_handle) { printf(
"Error while loading library %s. Error code %i\n", libname.c_str(), GetLastError());
m_reader =
nullptr;
return; }
71 typedef Reader* (__stdcall *f_funci)(
const std::string&);
72 f_funci newReader = (f_funci)GetProcAddress((HINSTANCE)(
dll_handle), newreader.c_str());
73 if (!newReader) { printf(
"Error while loading function %s from library %s. Error code %i\n", newreader.c_str(), libname.c_str(), GetLastError());
m_reader =
nullptr;
return; }
77#if defined(__linux__) || defined(__darwin__) || defined(__APPLE__) || defined(BSD) || defined(__sun)
78 dll_handle = dlopen(libname.c_str(), RTLD_LAZY | RTLD_GLOBAL);
79 if (!
dll_handle) { printf(
"Error while loading library %s: %s\n", libname.c_str(), dlerror());
m_reader =
nullptr;
return; }
80 using f_funci =
Reader *(*)(
const std::string&);
81 auto newReader = (f_funci)dlsym(
dll_handle, newreader.c_str());
82 if (!newReader) { printf(
"Error while loading function %s from library %s: %s\n", newreader.c_str(), libname.c_str(), dlerror());
m_reader =
nullptr;
return; }