Well this is the answer for your problem with compiling examples.
Go to http://www.glfw.org/, download source package.
Then go to console and type the following:
unzip glfw-3.1.1.zip
cd glfw-3.1.1/
mkdir curbuild && cd curbuild
cmake -G "Unix Makefiles" -DBUILD_SHARED_LIBS=ON ../
make -j3
sudo make install
this will place your glfw headers and .so files in appropriate folders under the /usr/local ( you don't have to manually move anything ).
Then some part of magic takes effect.
It happened so, that nanosvg has some kind of unhealthy build system inside ( premake4 + pre-made makefiles + damaged ( ??? ) Makefile generated from premake4 ).
To build example do the following.
Download nanosvg as .zip from the official github page.
In your console:
unzip nanosvg-master.zip
cd nanosvg-master/example
cp ../src/nanosvg* .
gcc -O2 example1.c -L/usr/local/lib -lGL -lglfw -lm -Wl,-rpath=/usr/local/lib -o example1
gcc -O2 example2.c -L/usr/local/lib -lGL -lglfw -lm -Wl,-rpath=/usr/local/lib -o example2
After performing these actions I was able to launch both examples. Good luck to you, and if you need any further explanations ( i.e. makefiles, command line invocations ) feel free to ask.
P.S.
I don't know if GLEW is really needed here, cause I have one installed in /usr/local, but it seems that GLFW and nanosvg have no dependencies on GLEW, and I was able to compile, link and run without linking against libGLEW.so.
btw, my current system is Linux Mint 17.
Linux host 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
I have Debian 8 x64 at home, if you need, I can test this there too.