Mail Archives: cygwin/1998/03/08/15:39:10
Something is wrong on using flag "-lm" for linking about function
"lgamma()" of
"math.h".
For example, I tried to comple the following test file:
#include <math.h>
main()
{
double a=1.0,x;
x = lgamma(a);
printf("%lf \n",x);
}
In b18, it failed as follows:
bash$ gcc -O gamma_test.c -lm
C:\gnuwin32\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\cygnus-2.7.2-970404\../../
.../../i386-cygwin32\lib/libm.a(w_lgamma.o)(.text+0x7):w_lgamma.c:
undefined refe
rence to `signgam'
gcc: Internal compiler error: program ld got fatal signal 1
Also in b19, it failed as follows:
BASH.EXE-2.01$ gcc -O gamma_test.c -lm
C:\CYGNUS\B19\H-I386~1\lib\gcc-lib\i386-cygwin32\2.7-B19\../../../../i386-cygwin
32\lib/libm.a(w_lgamma.o)(.text+0x7):w_lgamma.c: undefined reference to
`signgam'
On the other hand, this test file could be complied in Linux.
Furthermore, the following error can be observed in compiling another
file using flag "-lm":
C:\CYGNUS\B19\H-I386~1\lib\gcc-lib\i386-cygwin32\2.7-B19\../../../../i386-cygwin
32\lib/libcygwin.a(libcmain.o)(.text+0x58):libcmain.cc: undefined
reference to `
WinMain AT 16'
Please tell me what can I do for solving these problems.
Norihiro Ogata
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -