Changeset 913 in Sophya for trunk/SophyaLib/SysTools/pdlmgr.cc
- Timestamp:
- Apr 13, 2000, 5:58:41 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/SysTools/pdlmgr.cc
r895 r913 1 // This may look like C code, but it is really -*- C++ -*-2 1 // Gestionnaire de lien dynamique - R. Ansari 12/98 3 2 // LAL (Orsay) / IN2P3-CNRS DAPNIA/SPP (Saclay) / CEA 4 3 4 #include "pdlmgr.h" 5 5 #include <stdio.h> 6 6 #include <stdlib.h> … … 8 8 #include <iostream.h> 9 9 10 #include "pdlmgr.h"11 10 12 11 // Extension de noms de fichiers Shared libs … … 20 19 /*! 21 20 \class SOPHYA::PDynLinkMgr 21 \ingroup SysTools 22 22 This classes handles the run-time operations related to using shared 23 23 libraries. The present version has been adapted for different Unix 24 24 flavours (Linux, Compaq/Digital Unix, SGI IRIX, IBM AIX, Sun Solaris). 25 The example here the linking of shared library named "mylib.so" 26 containing a function \c double \c myfunction(double x). 27 \code 28 #include "pdlmgr.h" 29 typedef double (* AFunctionOfX) (double x); 30 { 31 // ... 32 string soname = "mylib.so"; 33 string funcname = "myfunction"; 34 PDynLinkMgr dyl(son); 35 AFunctionOfX f = (AFunctionOfX)dyl.GetFunction(funcname); 36 double x = 3.1425; 37 if (f != NULL) 38 cout << " X= " << x << " myfunction(x)=" << f(x) << endl; 39 // ... 40 } 41 \endcode 25 42 */ 26 43
Note:
See TracChangeset
for help on using the changeset viewer.