CUDA and C


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){
printf (“calling in C\n”);
return 0;

******************************* x_ejemplo7.h *****************************

void funcion_1(void);

****************************** *****************************

#include <stdio.h>
#include <>

void funcion_1(){
printf(“calling CU\n”);


and the content of 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.

i’m sorry
it was quite easy. here was the solution

#include <stdio.h>
#include <>

extern “C” void funcion_1(){
printf(“llamaba desde CU\n”);