I'm reading the "Introduction to 3D game programming with DirectX11" (Frank Luna) and i'm having problems with lighting. I have this error: Effect version is unrecognized. This runtime supports fx_5_0 to fx_5_0. When i use the D3DX11CreateEffectFromMemory function i have that error and an exception (this->mFX was nullptr) Can you help me? Thanks EDIT: I have no D3DCompileFromFile
std::ifstream fin("Ligthing.fx", std::ios::binary);
///
fin.seekg(0, std::ios_base::end);
int size = (int)fin.tellg();
fin.seekg(0, std::ios_base::beg);
std::vector<char> compiledShader(size);
fin.read(&compiledShader[0], size);
fin.close();
hr=D3DX11CreateEffectFromMemory(&compiledShader[0], size, //ERROR IS HERE
0, device, &mFX);
if (FAILED(hr)) {
MessageBox(0, L"err", 0, 0);
}