I also tried to compile things differently,
f95 -fno-second-underscore -c -fPIC pattern_dist.f90
gcc -std=gnu99 -shared -L/usr -o pattern_dist.so pattern_dist.o
now, I get the following error:
Error in dyn.load("~/myfortran/pattern_dist.so") :
unable to load shared library '/home/myfortran/pattern_dist.so':
/home/myfortran/pattern_dist.so: undefined symbol: _g95_section_info
Calls: source -> eval.with.vis -> eval.with.vis -> dyn.load
However, doing nm with the shared object name, shows up that symbol:
> nm ~/myfortran/pattern_dist.so | grep _g95_section_info
U _g95_section_info
Does anyone have an idea of what might be going on?
Thanks
On Sat, May 24, 2008 at 3:48 AM, what's in the name? <
[EMAIL PROTECTED]> wrote:
> Nope, it does not :( See below
>
> Error in .Fortran("merge_xtabs_patterns_file", ydim[1], ydim[2], x =
> as.integer(as.matrix(y)), :
> Fortran symbol name "merge_xtabs_patterns_file" not in load table
>
>
> On Sat, May 24, 2008 at 3:41 AM, Martin Maechler <
> [EMAIL PROTECTED]> wrote:
>
>> >>>>> "witn" == what's in the name? <[EMAIL PROTECTED]>
>> >>>>> on Sat, 24 May 2008 02:47:02 -0500 writes:
>>
>> witn> R.version gives the following output
>> >> R.version
>> witn> _ platform x86_64-unknown-linux-gnu
>> witn> arch x86_64 os linux-gnu system x86_64, linux-gnu
>> witn> status major 2 minor 6.0 year 2007 month 10 day 03 svn
>> witn> rev 43063 language R version.string R version 2.6.0
>> witn> (2007-10-03)
>>
>>
>> witn> If you see my previous email, I did try .Fortran with
>> witn> removing the last underscore, and I still got the same
>> witn> error. I made the .so file using the f95 compiler. In
>> witn> fact, 'nm *.so | grep xtabs', did show up the the name
>> witn> "merge_xtabs_patterns_file_ ". I am using f95 because
>> witn> my source code is written in f90.
>>
>> But in that case, I'd almost bet that
>>
>> .Fortran("merge_xtabs_patterns_file", ....)
>>
>> will work. The idea being that you use the same name as in the
>> fortran code, namely with*OUT* trailing "_".
>>
>> Regards,
>> Martin Maechler, ETH Zurich
>>
>
>
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.