Warning message


When I compile my code, I have this warning message :

"C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\wtime.inl", line 50: warn


          function "_wctime64" (declared at line 257 of "C:\Program

          Files\Microsoft Visual Studio 8\VC\INCLUDE\time.h") was declared

          "deprecated ("This function or variable may be unsafe. Consider

          using _wctime64_s instead. To disable deprecation, use

          _CRT_SECURE_NO_DEPRECATE. See online help for details.")"

      return _wctime64(_Time);

This doesn’t cause error but I’d like to fix it.

Thanks :)


This isn’t a CUDA problem, - a quick google search reveals that the solution is to define these two values by adding them to the command line compiler options:


ooo this takes me back to my first semester of college…eegghh i got goosebumps all over, yucky yuck

I don’t use Visual Studio. I just use its compiler. I’ve already tried to fix it by looking for in the Internet but without success…

I use cygwin to compile my CUDA fonction like that :

nvcc -o main.exe main.cu

I’ve tried to define these two constants



but the problem still persists…

I’m not sure but passing to compiler is not the same as #defines in the code right?

I have no idea. I’ve just tried what I’ve read on some forums…

Try -D_CRT…

that is same as /D I think only on linux but if you use cygwin.

It works perfectly! Thx dude :thumbsup:

you welcome no problem.