Just a collection of notes about useful tricks I've learned. I needed somewhere to put them.
- If you need to make the file available to all users of your machine, then the place is /usr/local/texlive/texmf-local/bibtex/bst. Then,
- sudo mkdir -p /usr/local/texlive/texmf-local/bibtex/bst
- sudo cp spbasic.bst /usr/local/texlive/texmf-local/bibtex/bst
- sudo mktexlsr
- How to incorporate external Fortran into IDL.
This process will probably ONLY work for gfortran on Mac OS X. I based this process on the notes I found here. The fortran code example1.f is here.
If you make any changes to the fortran code, you will have to exit and re-enter IDL to reload the fortran object. Call_external has a "/unload" option to prevent keeping the object in memory, but it completely breaks IDL for me.
- In the directory with the fortran code, on the linux command line, run "gfortran -fPIC -c example1.f". I ignored the warnings this command generated.
- Then run "gfortran -bundle -flat_namespace -dynamic -lm -lc -undefined suppress -o example1.so example1.o".
- On the IDL command line, run the following:
- sum = 0.
- s = call_external('example1.so', 'sum_array_', x, n_elements(x), sum)
Last Modified: 2013 Aug 20