Check gcc for the path where libalglib.a is installed, for example:
gcc -lalglib -L/my/path/
Check include files, you are adding none or some?
gcc -I/my/path/alglib/include
complete it would look like this
gcc -I/my/path/alglib/include -lalglib -L/my/path/