Or
    export LIBS="$LIBS -ldl"