Hello,
im Peter, from Spain, i’m triying to improve an existing program writing in C. well, the only thing i need, is to call a function written in CUDA from this program written in C.
supose the next example
******************************* x_ejemplo7.c****************************
#include <stdio.h>
#include “x_ejemplo7.h”
int main (void){
funcion_1();
printf (“calling in C\n”);
return 0;
}
******************************* x_ejemplo7.h *****************************
void funcion_1(void);
****************************** x_ejemplo7.cu *****************************
#include <stdio.h>
#include <x_ejemplo7_kernel.cu>
void funcion_1(){
printf(“calling CU\n”);
}
and the content of x_ejemplo7_kernel.cu is empty, is not important. the problem is , that alwais i obtain the same report
obj/release/x_ejemplo7.c.o: In function main': x_ejemplo7.c:(.text+0x5): undefined reference to
funcion_1’
how can i do? what i am doing bad? i’m sure is easy…
thanks a lot.
Peter