#include "config.hpp"
#include <stdlib.h>
#include <iostream>
#include <dlfcn.h>
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 29 of file tstdl.cpp.
34 cerr <<
"bad args" << endl <<
"Usage: tstdl filename symbol" << endl;
37 void *mod = dlopen(argv[1][0] ? argv[1] : 0, RTLD_NOW|RTLD_LOCAL);
40 cerr <<
"dlopen failed for file '" << argv[1] <<
"'\n" <<
41 "dlerror=" << dlerror() << endl;
44 void *sym = dlsym(mod, argv[2]);
45 cout <<
"sym=" << sym << endl;
49 cerr <<
"dl lib not enabled or not supported" << endl;