soley@well.UUCP (Norman Soley) (08/26/87)
I am having trouble compiling a program on my NCR Tower-XP. Actually any prog with a reference to exp(). The programs pass the compilation phase and create object modules but fail during the ld phase complaining about 'exp' being an unknown symbol. I've tried this on three different CPU's with the same result. My Towers are OEM boxes with someone elses label on them and they have been unable to help me with the problem. Any comments fron wizards experienced with the Tower would be appreciated. Norman S. Soley - Ontario Ministry of the Environment utgpu!ontmoh!ontmoe!norm utgpu!ontmoh!norm
gwyn@brl-smoke.ARPA (Doug Gwyn ) (08/27/87)
In article <3825@well.UUCP> soley@well.UUCP (Norman Soley) writes: >I am having trouble compiling a program on my NCR Tower-XP. Actually any prog >with a reference to exp(). The programs pass the compilation phase and create >object modules but fail during the ld phase complaining about 'exp' being >an unknown symbol. I've tried this on three different CPU's with the same result. First, please direct this sort of query to comp.unix.questions. The comp.bugs.sys5 newsgroup is for reporting bugs in UNIX System V and related software packages. The exp() function is contained in the math library, not in the standard C library. You need to ask the linker to search the math library by giving it a "-lm" pseudo-filename after all objects: cc -o myprog myprog.o subrs.o -lm >My Towers are OEM boxes with someone elses label on them and they have been >unable to help me with the problem. Some support you're getting -- this information is in INTRO(3) in the Programmer's Manual. All the functions in the manual with (3M) after their names are to be found in the math library.