gcc compilation

how can i do static compilation in gcc

my gcc version is

# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/u
sr/share/info --enable-shared --enable-threads=posix --disable-checking --with-s
ystem-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
#

Thanks in advance
Collins

gcc -static ...........

Hai Jim

I have tried it.. But when i have some user-defined library files the compiler throughs the error that it is unable to find the lib file....
My lib file is located at /lib
I gave the command
gcc -static -o myserver -lValidateCommand myserver.c

try

gcc -static -o myserver myserver.c /lib/libValidateCommand.so