[Rd] Error when compiling code in C

Fabio Mathias Corrêa fabio.ufla at yahoo.com.br
Wed Oct 21 02:38:29 CEST 2009


Dear,


I used the command in the terminal to compile code FORTRAN with directive OpenMP

export PKG_FCFLAGS=-fopenmp

It functioned perfectly for pure code FORTRAN.

However, when I call a function in C in code FORTRAN, the function in C is not compiled.

The following error appears

~/Fortran/parallel $ R CMD SHLIB para.f95 myrandom.c -o func.so -fopenmp

gfortran -fopenmp -fpic -g -O -c  para.f95 -o para.o
gcc -std=gnu99 -I/usr/share/R/include      -fpic  -g -O2 -c myrandom.c -o myrandom.c@
gfortran -shared -o func.so para.o myrandom.o -fopenmp -L/usr/lib64/R/lib -lR
gfortran: myrandom.o: No such file or directory
make: *** [func.so] Error 1

When compile only the function in code FORTRAN. The archive is compiled!

If compile only the function in C, the error I appear!

What it is occurring is that instead of generating an archive myrandom.o the compiler is generating an archive myrandom.c@

What I must make?

Thank you very much!


               Fábio Mathias Corrêa
Estatística e Experimentação Agropecuária/UFLA





      ____________________________________________________________________________________
Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com



More information about the R-devel mailing list