You might have miss a header related to Shader in your cpp project.
What error do you get during the crash ?