Page 1 of 1

CEGUI Direct3D11Renderer error on create

Posted: Thu Nov 04, 2010 16:54
by tmayr06
Hello!

I've tried to find the information I need by myself, but now after hours of research I'm totally upset -.-

Isn't there somewhere a list of needed libraries for each class/function? I've just tried to do the following:

Code: Select all

CEGUI::Direct3D11Renderer & renderer = CEGUI::Direct3D11Renderer::create(device, devContext);
CEGUI::System::create(renderer);
CEGUI::System::getSingleton().renderGUI();


..but there was an infinite list of linker errors. Now that I have linked to all this

Code: Select all

CEGUIBase_Static_d.lib
CEGUIDirect3D11Renderer_Static_d.lib
CEGUISILLYImageCodec_Static_d.lib
D3DX11EffectsD.lib
pcre_d.lib
CEGUIExpatParser_static_d.lib
expat_d.lib
freetype_d.lib
libpng_d.lib
jpeg_d.lib
zlib_d.lib


libraries, I'm getting the following linker errors:

Code: Select all

1>CEGUIBase_Static_d.lib(CEGUIScheme.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_getWindowRendererModule" in Funktion ""private: void __thiscall CEGUI::Scheme::loadWindowRendererFactories(void)" (?loadWindowRendererFactories@Scheme@CEGUI@@AAEXXZ)".

1>CEGUISILLYImageCodec_Static_d.lib(CEGUISILLYImageCodec.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) bool __cdecl SILLY::SILLYInit(void)" (__imp_?SILLYInit@SILLY@@YA_NXZ)" in Funktion ""public: __thiscall CEGUI::SILLYImageCodec::SILLYImageCodec(void)" (??0SILLYImageCodec@CEGUI@@QAE@XZ)".

1>CEGUISILLYImageCodec_Static_d.lib(CEGUISILLYImageCodec.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) void __cdecl SILLY::SILLYCleanup(void)" (__imp_?SILLYCleanup@SILLY@@YAXXZ)" in Funktion ""public: virtual __thiscall CEGUI::SILLYImageCodec::~SILLYImageCodec(void)" (??1SILLYImageCodec@CEGUI@@UAE@XZ)".

...


I guess the first one can be solved by adding one more lib (who knows which...maybe CE should ;) ), while for the other errors the linker seems to need the dlls instead of the libs, but i have defined CEGUI_STATIC...

:?

Re: needed libs

Posted: Thu Nov 04, 2010 18:03
by Kulik
I don't know about the first linker error but the last two are related to SILLY. SILLYImageCodec needs SILLY.lib (it should be in the dependencies package)

EDIT: I got confused by the German errors :-D The first error is because you don't link to CEGUIFalagardWRBase.lib

Re: needed libs

Posted: Thu Nov 04, 2010 19:04
by tmayr06
Oh yes, sorry for the german error messages, I didn't even think about that ;) Thanks for your help!
In the meantime I decided to dynamically link to CEGUI, so that I don't have to link to all the dependencies.

Now the compilation and linking work fine, but I get a runtime error. The output:

Code: Select all

Effects11: Internal loading error: cannot create shader reflection object.


With the call stack I could figure out that the Error happened in the Direct3D11Renderer constructor, on D3DX11CreateEffectFromMemory().

Code: Select all

if (FAILED(D3DX11CreateEffectFromMemory(ShaderBlob->GetBufferPointer(), ShaderBlob->GetBufferSize(),0, d_device.d_device, &d_effect) ))
{
   std::string msg("Direct3D11Renderer: failed to create effect!");
   throw RendererException(msg);
}


hmm..

Re: needed libs

Posted: Thu Nov 04, 2010 19:51
by Kulik
I've seen that error on the forum somewhere already http://www.cegui.org.uk/phpBB2/viewtopic.php?f=10&t=5226&p=25010&hilit=failed+to+create#p25010

It could be a bug in CEGUI, I am not using DX11 so I sadly can't check it right now. Perhaps you could provide a patch?

Re: needed libs

Posted: Thu Nov 04, 2010 20:12
by tmayr06
Wow, NVIDIA PerfHUD is just great, I didn't even know it! Thanks man ;)
I'm currently installing it, then we will see..

EDIT: Oh..ehm...doesn't support DX11 :? but there is the new Parallel Nsight which should work in a similar way..

Re: needed libs

Posted: Mon Nov 08, 2010 20:44
by tmayr06
I can't get it running...

But I could figure out that the error must have to do something with the VSMain and PSMain shaders in the CEGUIDirect3D11RendererShader.txt file. When I use

Code: Select all

SetVertexShader(NULL);
SetPixelShader(NULL);

instead of setting the VSMain and PSMain shaders, the error disappears! Obviously this isn't a good solution ;) but maybe it could help in finding the error..

Re: needed libs

Posted: Fri Nov 12, 2010 16:59
by tmayr06
I've found the solution to the problem!

DXD11Effects(D).lib is the problem. You simply have to rebuild the Effect11 sample (of the current DX SDK) and rename the outcoming lib-file to the correct name. Replace it, recompile CEGUI, and you're done.

Re: CEGUI Direct3D11Renderer error on create

Posted: Wed Jan 05, 2011 17:06
by GPHS
Hello tmayr06 ,

thanks for your help.
Could you be more "accurate" ? What do you mean by "to the correct name" ? what is the correct name to set for the DXD11Effects.lib file?
Are you sure it is necessary to recompile CEGUI afterwards?

Thanks again :wink:

Re: CEGUI Direct3D11Renderer error on create

Posted: Tue Feb 15, 2011 16:01
by tmayr06
Sry, took a while!

You have to build the Effects11 Sample from the DX SDK. The outcoming lib file (named Effects11.lib) has to be renamed to "D3DX11Effects.lib" (release) and "D3DX11EffectsD.lib" (for the debug-build). These new files go into the dependencies directory of CEGUI (dependencies\lib\static and dependencies\lib\dynamic). Afterwards you simply have to rebuild the WHOLE CEGUI and everything should work by then.

Re: CEGUI Direct3D11Renderer error on create

Posted: Fri Oct 28, 2011 06:40
by EmoryM
When I try the following:
CEGUI::Direct3D11Renderer& ceguiRenderer = CEGUI::Direct3D11Renderer::bootstrapSystem( pDevice, pDeviceContext );

I'm seeing:
Effects11: Internal loading error: cannot create shader reflection object.

I followed the instructions (built C++/Effects11 libs, renamed, replaced the libs under dependencies/lib static and dynamic, rebuilt CEGUI) but I'm getting an exception thrown on line 308 of CEGUIDirect3D11Renderer.cpp where D3DX11CreateEffectFromMemory fails.

Is there something else I should be doing?

Re: CEGUI Direct3D11Renderer error on create

Posted: Sun Oct 30, 2011 10:42
by EmoryM
I was using the wrong .dll - these instructions were accurate, thanks!

Re: CEGUI Direct3D11Renderer error on create

Posted: Mon Oct 31, 2011 08:20
by CrazyEddie
Thanks for posting the resolution to the issue (I had no ideas to offer :))

CE.