Thanks very much to all who replied. I went with Brian's approach, and
eventually, despite all my attempts to foul it up, I did get it to work
successfully. For the record here are the details.
The subroutine is:
subroutine SSFcoef(nmax,nu,A)
implicit double precision(a-h,o-z)
R community,
As you may know, R's iconv doesn't work well converting to and from
encodings that allow embedded nulls. For example
> iconv("foo", to="UTF-16")
Error in iconv("foo", to = "UTF-16") :
embedded nul in string: '\xff\xfef\0o\0o\0'
However, I don't believe embedded nulls are at issue
Prof Brian Ripley wrote:
>
> Well, it is not Fortran 77 but Fortran 95, and so needs to be given a
> .f95 extension to be sure to work.
>
I think most compilers only distinguish two fortran file extensions: .f or
.f90. .f denotes fixed-form source code while .f90 denotes free-form. Some
com
I'm not a windows expert. You have C code file (not cc or cpp):
> R CMD SHLIB OrthoFunctions.c
and you use g++ compiler... ok, we can use c++ compiler for c.. but
it's looks like c++ code with c code inside:
> extern "C" {
Try it without "extern "C" and with gcc compiler instead g++.
regards,