From fabio.ufla at yahoo.com.br  Wed Oct 21 02:38:29 2009
From: fabio.ufla at yahoo.com.br (=?iso-8859-1?Q?Fabio_Mathias_Corr=EAa?=)
Date: Tue, 20 Oct 2009 17:38:29 -0700 (PDT)
Subject: [Rd] Error when compiling code in C
Message-ID: <360529.75928.qm@web59704.mail.ac4.yahoo.com>

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



[Rd] Error when compiling code in C
=?iso-8859-1?Q?Fabio_Mathias_Corr=EAa?=