Jump to content
  • Advertisement
Sign in to follow this  
karnalta

DX11 D3D11 Create effect problem

This topic is 3346 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello all, I am new to DirectX and C++ and I am trying to dev a small 3D engine to learn quickly ^^ I am facing a problem with DX11 when trying to create a effect from a compiled memory effect. Here is my code : // Compiling effect ID3D10Blob* pCompiledEffect; HRESULT hr = D3DX11CompileFromFile("ef_MinBox.fx", NULL, NULL, "Render", "fx_4_0", dwShaderFlags, 0, NULL, &pCompiledEffect, NULL, NULL); if(FAILED(hr)) { MessageBox(0, "An error occured while compiling the effect file", 0, 0); return hr; } // Creating effect ID3DX11Effect* pEffect; hr = D3DX11CreateEffectFromMemory(&pCompiledEffect, sizeof(pEffect), NULL, mD3dDevice, &pEffect); When I compiled it, I got two error saying "unresolved external symbol" for "_D3DGetInputSignatureBlob@1"2 and "_D3DReflect@16". If I comment the function "D3DX11CreateEffectFromMemory" compilation work fine. It seem like the function "D3DX11CreateEffectFromMemory" is not define, but I see it in D3dx11effect.h and I have correctly included the header file. I have also include D3dx11effectD.lib with the linker. Someone can help me ? Thank in advance.

Share this post


Link to post
Share on other sites
Advertisement
you use D3DX11CompileFromMemory/File/Resource now. It does both shaders and effects. As to the error it looks like it didnot find any starting point do you have any techniques and passes in your effect file?

Share this post


Link to post
Share on other sites
Yes my effect file is a small but full effect file.

But I got my error when compiling my application, not when running it. It's not the effect compilation that cause the error.

Share this post


Link to post
Share on other sites
It's included, here are the lib file I added to the linker for my application.

d3d11.lib
d3dx11d.lib
d3dx10.lib
dxerr.lib
dxguid.lib
D3DX11EffectsD.lib

Share this post


Link to post
Share on other sites
Thank for all your help, but it still doesn't work.

I tryed with these lib as you said :

d3d11.lib
d3dx11.lib
d3dx10.lib
dxerr.lib
dxguid.lib
D3DX11Effects.lib

But I still have the same compilation error.

Share this post


Link to post
Share on other sites
I need it for the Vector and Matrix.

I need to include d3dx10math.h to use thing like D3DXVECTOR3 or D3DXMATRIX. And if I don't include d3dx10.lib I got external symbol error when using D3DXMatrixPerspectiveFovLH.

I tried without it to test, but I still have the same error.

Share this post


Link to post
Share on other sites
Then you may need to create your own matrix class. That is what I did. Here is a link to a message post I found and used as my basis.

http://www.gamedev.net/community/forums/topic.asp?topic_id=545482

Beware Ogre I used some it and chased my tail for hours before realizing thier matrices where the opposite of D3D. IE I had to swap the columns and rows to fix it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!