I am still having trouble sorting this out.
Here is one file.
int getmcf( double *OTF,
double *OTFc,
long Nx,
long Ny,
long Nz,
double NA,
double nimm,
double delxy,
double delz,
int nthread );
int main(int argc, char* argv)
{
double *ctf;
double *cone_filter;
long xpadded;
long ypadded;
long zpadded;
double na;
double nimm;
double delxy;
double delz;
int nthread;
int result;
result = getmcf(
ctf,
cone_filter,
xpadded,
ypadded,
zpadded,
na,
nimm,
delxy,
delz,
nthread
);
return 0;
}
I compile it with
gcc -Wall -c core2_d.c -o core2_d.c
The compilation returns without errors or warnings.
Here is the second file.
int getmcf(
double *OTF,
double *OTFc,
long Nx,
long Ny,
long Nz,
double NA,
double nimm,
double delxy,
double delz,
int nthread )
{
return 0;
}
I compile it with
nvcc -c getmcf.cu -o getmcf.o
The compilation returned without errors or warnings.
Here is the link command and the errors I get.
gcc -o core2_decon *.o -L/usr/local/cuda/lib64 -lcudart -lcuda
core2_decon.o: In function main': core2_decon.c:(.text+0x6d): undefined reference to
getmcf’
collect2: ld returned 1 exit status
Any help is appreciated.