From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079341819282.tru64-unix-managers.marc@archive.invalid> From: "Dipl.-Phys. S. Richter, IKP, Tel. 16-5152" Date: Thu, 02 Mar 2000 14:31:25 +0000 To: tru64-unix-managers Subject: C-Compiler/Loader problems libm.a X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079341819282 Hi Managers, I've got a slightly off topic question. One of our users is writing a C-program and he's using some math functions out of math.h. (A small piece of code is attached). When compiling the program he gets just those unresolved symbols, he's using ot of math.h. I checked the libm.a in /usr/ccs/lib - everything seems to be fine and we made sure that this file is included by specifying LD_LIBRARY_PATH to /usr/ccs/lib . He has no problems to resolve those symbols defined in libc.a such as fopen... Anyone can help? Regards Simone Dipl.-Phys. Simone Richter simone@ikp.tu-darmstadt.de Institut f. Kernphysik Schlossgartenstr. 9 Tel: +49 (0) 6151 / 16-5152, 16-3323 TU Darmstadt 64289 Darmstadt Fax: +49 (0) 6151 / 16-4321 ------------------------- Code example -------------------------------------- #include #include #include #include #include double gasdev(long *idum) { static int iset=0; static double gset; double fac,rsq,v1,v2; if (iset == 0) { do { v1=2.0*ran2(idum)-1.0; v2=2.0*ran2(idum)-1.0; rsq=v1*v1+v2*v2; } while ((rsq>=1.0) || (rsq == 0.0)); fac=sqrt(-2.0*log(rsq)/rsq); gset=v1*fac; iset=1; return(v2*fac); } else { iset=0; return(gset); } } ------------------------- thats the compiler/linker output ------------- >cc bayes.c ld: Unresolved: log sqrt