Skip to content
Snippets Groups Projects
Commit 3f2b55ee authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Report underlying error when dlopen fails in listcomponents

When dlopen files in listcomponents.exe, listcomponents
prints only that the library didn't load, but doesn't
include information on the underlying error. This change
adds the result of dlerror to the error message.

See merge request !159
parents 1d3f99c4 8cdc6067
No related branches found
No related tags found
1 merge request!159Report underlying error when dlopen fails in listcomponents
Pipeline #
......@@ -108,7 +108,8 @@ int main(int argc, char* argv[]) {
<< std::endl;
}
} else {
std::cerr << "ERROR: failed to load " << lib << std::endl;
std::cerr << "ERROR: failed to load " << lib
<< ": " << dlerror() << std::endl;
return EXIT_FAILURE;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment