Hello, I work for the U.S. Department of Labor. I am trying to correct a C cursor screen used by states in forecasting their Unemployment Insurance Trust Fund. I have work on on other screens used by this application, and I am getting familiar with curses.h. However, this problem ins new to me and I can use some help. The screen I am working on has the includes:

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <curses.h>
#include <term.h>

I have the math.h include in there, but when I compile I get the link errors:

Undefined first referenced
symbol in file
exp bsyrhd.o
log bsyrhd.o
pow bsyrhd.o
fabs bsyrhd.o
sqrt bsyrhd.o

All of these missing items are math functions that should be found in math.h, but the linker is not finding them. I use math.h in many other files in this large application, and there is not a problem with finding these functions, so I am thinking that there is some conflict between curses.h and math.h. I am compiling with the gcc compiler, using the commands:

#! /bin/csh
/opt/SUNWspro/bin/cc $1.c -L/usr/ccs/lib -lcurses -o $1

Any help with this issue is greatly appreciated.