nvcc error : call can not be configured i'm a beginner with cuda

Hi all , i tryed to compile a cuda source file but i had a problem ,

i wrote : nvcc --device-emulation -c “myfile.cu”

and he tell me :

error : call can not be configured (l.34)

that’s my code :

[codebox]#include <stdio.h>

#include <stdlib.h>

device int verifpremier(int nombre);

int verifpremier(int nombre)


 int ispremier = 1;

 int i=2;

while(i<(nombre - 1))


	if(nombre % i == 0)


		ispremier = 0;





if(ispremier == 1)


printf("%d \n",nombre);


return 0;


device int main (int argc , char *argv)


int iboucle = 1;

while (iboucle)






return 0;


I repeat that i’m a beginner with CUDA . I would like to compare performance between my cpu and my graphic card . Thanks for your help. (google is not my friends)

(Sorry for my english , i’m french).

You have many examples in cuda_sdk.
Can you compile and run correctly these examples?

I can run them but i can’t compile them . He tell me error about .h files .
(I hate the CUDA compiler ^^)

what program do you use? visual studio 2005? or 2008? on VS2005 is more stable but now with the new cuda driver (2.1) is possible also to compile on VS2008.

Exist more information about how configure visual to compile cuda correctly in this forum (http://forums.nvidia.com/index.php?showtopic=83054)

However, in my opinion, it’s more easier on linux (ubuntu).