Not -lGLEW -lGL, but '-lGLEW, -lGL'. There should be a guard against that...