#include <dlfcn.h>
#include <iostream>
Go to the source code of this file.
◆ main()
Definition at line 4 of file Reconstruction/MdcPatRec/TrkBase/test/test.cxx.
4 {
5 using std::cerr;
6 using std::cout;
7
8 cout << "C++ dlopen demo\n\n";
9
10
11 cout << "Opening TrkBase.so...\n";
12 void* handle = dlopen( "../rh73_gcc32/libTrkBase.so", RTLD_LAZY );
13
14 if ( !handle )
15 {
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}