rand() linker error


I´ve made a new classes library project in c++ .net, in one of the .cpp
I use the rand() function from C, and when I compile, I get the following exception:

error LNK2001: símbolo externo "int __cdecl rand(void)" (?
rand@@$$J0YAHXZ) sin resolver

I include the correct .h and even tried:
extern "C"
#include <stdlib.h>
but I continue get the same exception...