Linker error when implementing CEGUI

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

frostraver
Just popping in
Just popping in
Posts: 4
Joined: Tue Sep 03, 2013 17:12

Linker error when implementing CEGUI

Postby frostraver » Thu Sep 05, 2013 22:33

Hi everyone,

I guess this should be fairly easy to fix I think but I can't seem to fix it myself.

I get the following error when I'm compiling:

Code: Select all

LNK2019: unresolved external symbol "__declspec(dllimport) public: static class CEGUI::Direct3D10Renderer & __cdecl CEGUI::Direct3D10Renderer::create(struct ID3D10Device *)" (__imp_?create@Direct3D10Renderer@CEGUI@@SAAAV12@PAUID3D10Device@@@Z) referenced in function "public: virtual bool __thiscall TestGameApp::InitGame(void)" (?InitGame@TestGameApp@@UAE_NXZ)


I've included both the include folder and the library folder in my project properties in VIsual Studio 2012.
And I also used #include on the necessary headers (I think)

Regards,
Frostraver

Trioxin
Just popping in
Just popping in
Posts: 3
Joined: Sun Apr 24, 2011 09:13

Re: Linker error when implementing CEGUI

Postby Trioxin » Thu Sep 05, 2013 23:05

Did you include the *.lib files?

I'm not too sure about 2012, but under vc++ 2010, it's:
Right click project -> properties -> linker -> input -> additional dependencies

Add the following two lines:

CEGUIBase.lib
CEGUIOgreRenderer.lib (replace OgreRenderer with the renderer you want to use)

adding the path to the lib folder under General isn't enough, you need to specify the specific lib files to use.

frostraver
Just popping in
Just popping in
Posts: 4
Joined: Tue Sep 03, 2013 17:12

Re: Linker error when implementing CEGUI

Postby frostraver » Fri Sep 06, 2013 11:34

I did it like this in my code. I don't know if that's enough since it's the first time I work with this kind of library.

Code: Select all

#ifdef _DEBUG
#pragma comment( lib, "CEGUIBase_d.lib" )
#pragma comment( lib, "CEGUIDirect3D9Renderer_d.lib" )
#else
#pragma comment( lib, "CEGUIBase.lib" )
#pragma comment( lib, "CEGUIDirect3D9Renderer.lib" )
#endif


I'll try and at them to the properties as well

EDIT: I tried what you said and noticed a mistake. I'm using DirectX10 so the second lib file isn't the right one. I coulnd't find one for DirectX 10 though. Am I missing something?


Return to “Help”

Who is online

Users browsing this forum: No registered users and 27 guests