MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / dlOpen

Function dlOpen

src/OSspecific/POSIX/POSIX.C:1199–1224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1197
1198
1199void* Foam::dlOpen(const fileName& lib, const bool check)
1200{
1201 if (POSIX::debug)
1202 {
1203 std::cout<< "dlOpen(const fileName&)"
1204 << " : dlopen of " << lib << std::endl;
1205 }
1206 void* handle = ::dlopen(lib.c_str(), RTLD_LAZY|RTLD_GLOBAL);
1207
1208 if (!handle && check)
1209 {
1210 WarningInFunction
1211 << "dlopen error : " << ::dlerror()
1212 << endl;
1213 }
1214
1215 if (POSIX::debug)
1216 {
1217 std::cout
1218 << "dlOpen(const fileName&)"
1219 << " : dlopen of " << lib
1220 << " handle " << handle << std::endl;
1221 }
1222
1223 return handle;
1224}
1225
1226
1227bool Foam::dlClose(void* handle)

Callers 2

codeStream.CFile · 0.85
openFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected