|
|
|
||||||
|
Dynamic Loading in Splusdyn.load and dyn.load2 are not supported in Splus 6 Dynamic loading in Splus is supported via the 'CHAPTER' mechanism. The best description of how to interface C and Fortran code with S-PLUS 6 for Unix can be found in the green book by John Chambers: "Programming With Data, Chapter 11: Interfacing With C and Fortran Code". I also suggest looking at the "Getting Started With Splus" Guide or the migrate.pdf file that is found in '/usr/local/splus6.2/doc'. You should have received this book with your purchase of Splus for Unix. In S-PLUS 6 it is no longer necessary to manually build the shared library and load your routines as it was in Splus3.4 - the CHAPTER mechanism automatically takes care of this. Any directory you start Splus in needs to be set-up to work correctly with Splus by invoking the command: 'Splus CHAPTER' from this directory. This properly initializes the directory for use with Splus and creates some necessary subdirectores for objects and the help system. It looks for any existing *.c or *.f files in this directory and creates a makefile with the proper instructions for Splus to load a shared object file S.so. You will need to reissue the command 'Splus CHAPTER' every time you put new source files into this directory. Once you have issued this command you can use the command: 'Splus make' to create this shared object library(S.so). This library will automatically be linked to a newly opened Splus session. If you wish to give the shared object file a name other than 'S.so' you can edit the makefile and change the target specifications. Fortran Input/Output StatementsUsing Fortran I/O statements (read, write, etc.) is forbidden when using dynamic loading in Splus. This has the unfortunate side effect of making most IMSL subroutines unloadable. Try using the IMSL C libraries. Statsci says: The best way to avoid the fortran i/o problem is to figure out the names of the i/o routines on that system and define C functions by the same names that do nothing but perhaps print a warning that someone tried to do fortran i/o. The programmer's manual had an example of this I think. See section 9.13.1. |
|
If you have trouble accessing this page, or need an alternate format contact webmaster@stat.osu.edu. |