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

Function dlSymFound

src/OSspecific/POSIX/POSIX.C:1267–1291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1265
1266
1267bool Foam::dlSymFound(void* handle, const std::string& symbol)
1268{
1269 if (handle && !symbol.empty())
1270 {
1271 if (POSIX::debug)
1272 {
1273 std::cout
1274 << "dlSymFound(void*, const std::string&)"
1275 << " : dlsym of " << symbol << std::endl;
1276 }
1277
1278 // clear any old errors - see manpage dlopen
1279 (void) ::dlerror();
1280
1281 // get address of symbol
1282 (void) ::dlsym(handle, symbol.c_str());
1283
1284 // symbol can be found if there was no error
1285 return !::dlerror();
1286 }
1287 else
1288 {
1289 return false;
1290 }
1291}
1292
1293
1294static int collectLibsCallback

Callers 2

loadLibraryFunction · 0.85
unloadLibraryFunction · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected