Thank you very much
I tacked all the included files and found that stdafx.h includes includes gl.h , while glew.h in included after stdafx.h in another file so I put glew.h before stdafx.h. the error disappeared but I had a new lovely error and I dont know if it is related to the previous one or no, the error is:
fatal error LNK1181: cannot open input file ‘C:\Program.obj’
i included the path to the library in the linker>general> additional library dictionary and in the linker>input > additional dependencies at the same time and removed the REad-only from all the c files, but in vain. teh same error.
I would be grateful to hear your opinion again. many thanks