It appears that the search path for the standard C++ library is set differently in csh vs. when you run from the command line.
Linking the standard libraries statically should make the library search path irrelevant: change your makefile as follows:
CFLAGS = -O3 -fopenmp -static-libgcc -static-libstdc++