Link Error D3DX11CreateEffectFromMemory

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Link Error D3DX11CreateEffectFromMemory

      Hello everybody, first of all i would like to express my appreciation for the great book you guys made, i am just getting started with it but i love your writing style and the goofy side stories already =P

      So I wanted to compile the Bookcode, but i simply can't get it to work. I am on Visual Studio 2013, i have manually downloaded the June 2010 DirectX SDK and i have already solved some issues myself, like recompiling some of the libraries so that they work with VS 2013, but When i try to complie the Project I run into this Linking error which i can't get resolved for about 2 hours now =/ I have tried to recompile the Effects11.lib, but that didnt help either.

      Source Code

      1. Error 86 error LNK1120: 1 unresolved externals D:\Visual Studio 2013 Projects\GameCode4\Source\Lib\Win32Debug\GCC4EditorDLL_2010.dll 1 1 GCC4EditorDLL_2010
      2. Error 88 error LNK1120: 1 unresolved externals D:\Visual Studio 2013 Projects\GameCode4\Source\Lib\Win32Debug\TeapotWars_2010Win32Debug.exe TeapotWars_2010
      3. Error 57 error LNK2019: unresolved external symbol _D3DX11CreateEffectFromMemory@20 referenced in function "public: long __thiscall LineDraw_Hlsl_Shader::OnRestore(class Scene *)" (?OnRestore@LineDraw_Hlsl_Shader@@QAEJPAVScene@@@Z) D:\Visual Studio 2013 Projects\GameCode4\Source\GCC4Editor\Msvc\gamecode4_2010.lib(Shaders.obj) GCC4EditorDLL_2010
      4. Error 87 error LNK2019: unresolved external symbol _D3DX11CreateEffectFromMemory@20 referenced in function "public: long __thiscall LineDraw_Hlsl_Shader::OnRestore(class Scene *)" (?OnRestore@LineDraw_Hlsl_Shader@@QAEJPAVScene@@@Z) D:\Visual Studio 2013 Projects\GameCode4\Source\TeapotWars\Msvc\gamecode4_2010.lib(Shaders.obj) TeapotWars_2010


      Edit:
      After some more testing i found out that the gamecode4_2010.lib itself compiles and binds without problem... but when it shall be bound itself everything goes wrong... and i dont really get how that happens xD

      Edit2:
      It is working! well partially, now i get a heap corruption because of the bullet lib, but it is compiling and linking.

      For other people that might have this issue, i am not really sure what fixed it, but it tried to recompile all 3rd party libs, and be careful with compiling the effects.lib, it is default set to "Multi-threaded Debug DLL (/MDd)" in C/C++ -> Code Generation -> Runtime Library, but it should be "Multi-threaded Debug (/MTd)", at least that got it working for me.
      And on another Note, in the TeapotWars Project Options, the input directory for the effects11 header is missing from the list, that should probably be added

      Off trying to find a Bullet lib version that doesnt like to eat the heap...

      The post was edited 3 times, last by EloProf ().

    • Thanks for the post and welcome to the forums!

      As you've discovered, the code was written for a much older version of Visual Studio (2010 to be exact) so there a ton of issues with 2013. I actually just bought 2013 a few weeks ago. I figured since we just switched to 2013 at work and at the school where I teach, I might as well get my own copy.

      Anyway, once I free up a little, I do plan on jumping in and getting a reliable 2013 build. The big problem isn't the code, it's the 3rd party libraries. You're correct in that the only fix I know of is to go in and rebuild them yourself. That's the disadvantage to using 3rd party libs. :( I seem to remember some general wonkiness with Bullet as well. I think someone was able to fix that with an earlier version of the lib.

      If we do another book, I might suggest ditching as many of the 3rd party libs as possible. They've caused quite the headache.

      -Rez
    • We got rid of Boost in the 4th edition, thank goodness....not that I have anything specifically against it but it was a huge pain to integrate with a wide variety of Visual Studio versions....
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • Hey, cool that you two are actually active in here xD

      I tried every different bulletversion, but i just cant get the damn thing to work =/, even tried to manually patch some stuff...

      Perhab you can get it to work, since i am just a student myself and you certainly know more about the ins and outs of visual studio and the likes =P until then I will have to resign to not be able to shoot some teapots...

      On the note of reducing the 3rd Party libs:
      If you for example remove bullet, you would have to explain how to do basic physics yourselves... that might be possible, but might as well be beyond the scope you can cover in the book

      On another note, i would like to express some Feedback regarding the Book:
      I think it would really help to have a big visual representation of how the different systems communicate with each other and who initialises what. I found out myself after quite some code digging, but i think a nice diagram would help a lot.
    • There is a user created diagram here that was created a bit back, shows some of the general architecture of the engine.
      PC - Custom Built
      CPU: 3rd Gen. Intel i7 3770 3.4Ghz
      GPU: ATI Radeon HD 7959 3GB
      RAM: 16GB

      Laptop - Alienware M17x
      CPU: 3rd Gen. Intel i7 - Ivy Bridge
      GPU: NVIDIA GeForce GTX 660M - 2GB GDDR5
      RAM: 8GB Dual Channel DDR3 @ 1600mhz