It is very possible that your card needs the legacy drivers instead of the ones you installed. Also make sure you have the headers installed.See the Debian Wiki for more information.
I installed the nvidia drivers (343.36). However when i installed it via smxi it didnt install the opengl headers (gl.h and company). I hear that mesa-common-dev contains those file, but mesa is part of the DRI drivers. It is safe to use mesa headers with nvidia drivers or are they 2 different things ?