Page 1 of 1

set up questions

Posted: Thu Oct 16, 2008 15:47
by fry

I would like to know, what I have to do to compile and run a program using cegui...

what i have done yet:
1. i downloaded the 0.6.1 version and unpacked it
2. in vs2005 options i included the path to the include, lib and bin folder
3. i followed the first tutorial ("The Beginner Guide to Getting CEGUI Rendering") and inserted the code into my directx9 project
4. after error messages saying that the class or namespace is not know, i included "cegui.h"
5. now its saying that "DirectX9Renderer" is not an element of cegui.....

so what am i doing wrong? please, could anyone help me?

Posted: Thu Oct 16, 2008 17:51
by Kevin

It seems that you need to include the file containing the DirectX9Renderer, which is

Code: Select all


inside the CEGUI folder. So, you should just be able to

Code: Select all


assuming it can find the other CEGUI include files, like cegui.h (which it seems it can!)


Posted: Thu Oct 16, 2008 23:59
by fry

thanks for your reply first!

ok, that "include file" hint was a good one - but then i got about 30 link errors about "cegui (..public: __thiscall CEGUI::String::~String(void)" (__imp_??1String@CEGUI@@QAE@....)
so i took the cegui.h include out (i don't even know if i had to include it..)
and got only 4 errors after it. the first one says that CEGUI::System doesn't have a constructor and point to the following line (copied from the tutorial):

Code: Select all

new CEGUI::System( myRenderer );
another one says "CEGUI::System is an undefined type"...

has anyone another hint for me? what is the main problem - in my opinion i forgot to include something or so...

Posted: Fri Oct 17, 2008 02:35
by Kevin
Hello again,

You most definitely need to include cegui.h.

The linker errors are suggesting that you are not linking with the necessary .lib files. I'm not sure where it is in VS2005, but in VS2003, it's under Project -> Properties -> Linker -> Input. You need to put under "Additional Dependencies" (in addition to any DirectX libs), CEGUIBase.lib (or CEGUIBase_d.lib) and DirectX9GUIRenderer.lib (or DirectX9GUIRenderer_d.lib).


Posted: Fri Oct 17, 2008 09:53
by maori

just in case you havent done so in your project properties for debug

c++/general/additional depencys add

linker/general/additional lib directorys add something like "$(CEGUI)/lib";"$(CEGUI)/dependencies/lib"

then in linker/general/input additional dependancys add
CEGUIBase_d.lib DirectX9GUIRenderer_d.lib CEGUIFalagardWRBase_d.lib d3d9.lib odbc32.lib odbccp32.lib

for release builds do the same but remove the _d from the libs
the $(CEGUI) comes from adding a enviromental vairiable you could just change that to point to your cegui install path.

dont forget to add the required .dll files to the folder you run your built exe from

hope this helps