#include <iostream>
#include <dlfcn.h>
Go to the source code of this file.
◆ main()
Definition at line 5 of file Reconstruction/MdcPatRec/TrkBase/TrkBase-00-01-11/test/test.cxx.
5 {
6 using std::cout;
7 using std::cerr;
8
9 cout << "C++ dlopen demo\n\n";
10
11
12 cout << "Opening TrkBase.so...\n";
13 void* handle = dlopen("../rh73_gcc32/libTrkBase.so", RTLD_LAZY);
14
15 if (!handle) {
16 cerr << "Cannot open library: " << dlerror() << '\n';
17 return 1;
18 }
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36 cout << "Closing library...\n";
37 dlclose(handle);
38}