CEGUI Direct3D11Renderer error on create

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

tmayr06
Just popping in
Just popping in
Posts: 8
Joined: Thu Nov 04, 2010 02:14

CEGUI Direct3D11Renderer error on create

Postby tmayr06 » Thu Nov 04, 2010 16:54

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...

:?
Last edited by tmayr06 on Fri Nov 12, 2010 23:22, edited 1 time in total.

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: needed libs

Postby Kulik » Thu Nov 04, 2010 18:03

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

tmayr06
Just popping in
Just popping in
Posts: 8
Joined: Thu Nov 04, 2010 02:14

Re: needed libs

Postby tmayr06 » Thu Nov 04, 2010 19:04

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..

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: needed libs

Postby Kulik » Thu Nov 04, 2010 19:51

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?

tmayr06
Just popping in
Just popping in
Posts: 8
Joined: Thu Nov 04, 2010 02:14

Re: needed libs

Postby tmayr06 » Thu Nov 04, 2010 20:12

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..

tmayr06
Just popping in
Just popping in
Posts: 8
Joined: Thu Nov 04, 2010 02:14

Re: needed libs

Postby tmayr06 » Mon Nov 08, 2010 20:44

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..

tmayr06
Just popping in
Just popping in
Posts: 8
Joined: Thu Nov 04, 2010 02:14

Re: needed libs

Postby tmayr06 » Fri Nov 12, 2010 16:59

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.

GPHS
Just popping in
Just popping in
Posts: 1
Joined: Wed Jan 05, 2011 17:03

Re: CEGUI Direct3D11Renderer error on create

Postby GPHS » Wed Jan 05, 2011 17:06

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:

tmayr06
Just popping in
Just popping in
Posts: 8
Joined: Thu Nov 04, 2010 02:14

Re: CEGUI Direct3D11Renderer error on create

Postby tmayr06 » Tue Feb 15, 2011 16:01

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.

EmoryM
Just popping in
Just popping in
Posts: 2
Joined: Fri Oct 28, 2011 06:32

Re: CEGUI Direct3D11Renderer error on create

Postby EmoryM » Fri Oct 28, 2011 06:40

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?

EmoryM
Just popping in
Just popping in
Posts: 2
Joined: Fri Oct 28, 2011 06:32

Re: CEGUI Direct3D11Renderer error on create

Postby EmoryM » Sun Oct 30, 2011 10:42

I was using the wrong .dll - these instructions were accurate, thanks!

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: CEGUI Direct3D11Renderer error on create

Postby CrazyEddie » Mon Oct 31, 2011 08:20

Thanks for posting the resolution to the issue (I had no ideas to offer :))

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 13 guests