what are generally the errors that can produce a linking error with a shader program ?
I have created my main.cpp programm in addition
of the shader class in a header file plus
the two separated files of fragment and
vertex shaders but I am getting a white triangle and a
Definition for void main() not found
is that problem related to my code or to the the path of the shaders files ?
I tweaked the markup in your post to highlight this error message (it wasn’t obvious that it was there before).
This sounds like an error that occurred when compiling one of your shaders (either vertex or fragment shader in your case). They each need their own main() routine.
If one of them failed to compile (as this error message suggests), then as you’d expect, you definitely can’t link them together successfully into a program.
Re forum markup, see this page for tips. For blocks of code and error messages, see this section: this section. Update: Here’s another quick ref (better for fast reference): Markdown reference.