Topic: Using SF with Numerical Recipes F90 Code

After compiling modules nr, nrtype, and nrutil in SF and creating a test project where a call is made to nrerror (which is defined in nrutil), when I Build the project I get an error message: undefined reference to __nrutil_MOD_nrerror .

I have put the modules in a folder and use the Project Options for File Reference to point to that folder.

Any help would be appreciated.

Re: Using SF with Numerical Recipes F90 Code

The error occurring is at the linking stage, and the linker can't find a library or object file that contains that routine.  Module files only contain the definitions of routines, variables, etc.  They do not include the actual routines, variables, etc.

When you say you compiled these modules, what were the steps you took?  You probably want to create a separate project that generates a static library from the source files for nr, nrtype, and nrutil.  In your main project, you'll want to add that static library either via compiler flags or by referencing it directly through inclusion in the project.

Jeff Armstrong
Approximatrix, LLC

Re: Using SF with Numerical Recipes F90 Code

Thank you, Jeff. I will pursue your suggestions.