00001 #include <iostream>
00002 #include <dlfcn.h>
00003
00004 #include "MdcData/MdcHit.h"
00005
00006 int main() {
00007 using std::cout;
00008 using std::cerr;
00009
00010 cout << "C++ dlopen demo\n\n";
00011
00012
00013 cout << "Opening MdcData.so...\n";
00014 void* handle = dlopen("../rh73_gcc32/libMdcData.so", RTLD_LAZY);
00015
00016 if (!handle) {
00017 cerr << "Cannot open library: " << dlerror() << '\n';
00018 return 1;
00019 }
00020
00021 MdcHit hit(NULL,NULL);
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 cout << "Closing library...\n";
00040 dlclose(handle);
00041 }
00042