Try: gcc -g -DTEST -I/usr/local/include -g -o libshell libshell.c \ -L/usr/local/lib -lldap -llber -lnsl -lsocket Kurt