l***@donet.com
2000-12-31 09:24:58 UTC
Any ideas on this error message, I am compiling a program that uses the
splotch AI engine, and I get the following output..
splotch.o(.text+0x137):splotch.c: undefined reference to `random'
splotch.o(.text+0x191):splotch.c: undefined reference to `random'
splotch.o(.text+0x36c):splotch.c: undefined reference to `srandom'
splotch.o(.text+0x672):splotch.c: undefined reference to `random'
splotch.o(.text+0x1295):splotch.c: undefined reference to `random'
This program compiles fine under linux and cygwin, but I am trying to
compile under mingw .. any clues? here is a section of code that uses the
"random" function out of splotch.c
else {
if ((random() % 100)+1)
usetempl(maxtempl);
else {
i = (random() % SP_HIST);
i = oldkeywd[i];
if (DEBUG)
fprintf(stderr, "<<SP_HIST used, i=%i>>\n",i);
if (i < 0)
usetempl(maxtempl);
else usetempl(i);
}
splotch AI engine, and I get the following output..
splotch.o(.text+0x137):splotch.c: undefined reference to `random'
splotch.o(.text+0x191):splotch.c: undefined reference to `random'
splotch.o(.text+0x36c):splotch.c: undefined reference to `srandom'
splotch.o(.text+0x672):splotch.c: undefined reference to `random'
splotch.o(.text+0x1295):splotch.c: undefined reference to `random'
This program compiles fine under linux and cygwin, but I am trying to
compile under mingw .. any clues? here is a section of code that uses the
"random" function out of splotch.c
else {
if ((random() % 100)+1)
usetempl(maxtempl);
else {
i = (random() % SP_HIST);
i = oldkeywd[i];
if (DEBUG)
fprintf(stderr, "<<SP_HIST used, i=%i>>\n",i);
if (i < 0)
usetempl(maxtempl);
else usetempl(i);
}