Re: [Rd] forcing the use of the c++ linker with c++ and fortran sources

2009-01-09 Thread Prof Brian Ripley
You are correct: there is no reason to assume that the F90 compiler can link C++ nor that the C++ compiler can link F90, and in general they cannot. Quite a few systems have a different vendor's F9x compiler (including say g95 vs gcc3 and SunPro F9x vs gcc4). Even in a pure gcc4 scenario, eac

Re: [Rd] forcing the use of the c++ linker with c++ and fortran sources

2009-01-09 Thread Steve Guerrero
Sorry I was a little stingy with details. I'm building a very simple package on linux with R 2.7.1 no configure script or homemade makefiles. my src directory has two files: src/foo.cpp src/bar.f90 I run "R CMD install myproject " which runs fine, no errors, and produces a shared library i.e

Re: [Rd] forcing the use of the c++ linker with c++ and fortran sources

2009-01-09 Thread Duncan Murdoch
On 09/01/2009 4:04 PM, Steve Guerrero wrote: I'm trying to build a package which has both gfortran and c++ code. In my installation of R, the R CMD INSTALL process compiles each c++ and gfortran code with the correct compiler, but performs the link step with "gfortran" and this creates undefin