Changeset 2877 in Sophya for trunk/SophyaProg
- Timestamp:
- Jan 3, 2006, 3:37:43 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaProg/Tests/tdynl.cc
r2615 r2877 51 51 PDynLinkMgr * dyl = PDynLinkMgr::BuildFromCFile(cfilename); 52 52 PrtTim(" End of Compile-Link "); 53 54 MyDlFunctionOfXY f = (MyDlFunctionOfXY)dyl->GetFunction("myf_dyl"); 55 if (f != NULL) { 56 cout << " DlFunction f dyl.GetFunction(myf_dyl) linked OK - calling f() " << endl; 57 cout << "f(0,1)= " << f(0.,1.) << " ?= testfunc_dynl(0,1)= " << testfunc_dynl(0.,1.) << endl; 58 cout << "f(1,1)= " << f(1.,1.) << " ?= testfunc_dynl(1,1)= " << testfunc_dynl(1.,1.) << endl; 59 cout << "f(-1,2.5)= " << f(-1.,2.5) << " ?= testfunc_dynl(-1,2.5)= " << testfunc_dynl(-1.,2.5) << endl; 60 } 61 else { 62 cout << " ERROR linking DlFunction f !!! " << endl; 53 if (dyl != NULL) { 54 MyDlFunctionOfXY f = (MyDlFunctionOfXY)dyl->GetFunction("myf_dyl"); 55 if (f != NULL) { 56 cout << " DlFunction f dyl.GetFunction(myf_dyl) linked OK - calling f() " << endl; 57 cout << "f(0,1)= " << f(0.,1.) << " ?= testfunc_dynl(0,1)= " << testfunc_dynl(0.,1.) << endl; 58 cout << "f(1,1)= " << f(1.,1.) << " ?= testfunc_dynl(1,1)= " << testfunc_dynl(1.,1.) << endl; 59 cout << "f(-1,2.5)= " << f(-1.,2.5) << " ?= testfunc_dynl(-1,2.5)= " << testfunc_dynl(-1.,2.5) << endl; 60 } 61 else { 62 cout << " ERROR linking DlFunction f !!! " << endl; 63 } 64 delete dyl; 63 65 } 64 delete dyl;65 } 66 else cout << " ERROR Creating shared object !!! " << endl; 67 } 66 68 67 69 catch (PThrowable & exc) {
Note:
See TracChangeset
for help on using the changeset viewer.