rand()
is not compiled into libc cause of some ramdom issues :)
You can find sources in msp430-libc/src/stdlib/rand.c

~d

On Wednesday 06 August 2003 23:24, Dipak Prasad wrote:
> Hi
>
> I encounter the following error when I try to call the rand() function:
> /cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccC5tFHR.o(.text+0x20e): In
> function `main' : undefined reference to `rand'
>
>
> I downloaded msp430-libc-1.0.20030207 and was able to make and make install
> through cygwin. (I am on Windows XP).
> The command line I used to compile my code:
>
> msp430-gcc.exe  file.c -mmcu=msp430x1121 -o
> file.elf  -L"C:\mspgcc\msp430\lib" -lc
>
> I also tried the -O2 and -lm options, but same result. I know that
> msp430-gcc can see libc.a otherwise it would have complained about it.
> I have included, stdlib.h, stdio.h and stddef.h header files.
>
>
> Any help will be deeply appreciated.
>
> Regards
>
> Dipak Prasad
>
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users

-- 
/*****************************************************************
     ("`-''-/").___..--''"`-._     (\   Dimmy the Wild     UA1ACZ
      `6_ 6  )   `-.  (     ).`-.__.`)  State Polytechnical Univ.
      (_Y_.)'  ._   )  `._ `. ``-..-'   Radio-Physics Departament
    _..`--'_..-_/  /--'_.' ,'           Saint Petersburg,  Russia
   (il),-''  (li),'  ((!.-'             +7 (812) 5403923, 5585314
 *****************************************************************/


Reply via email to