Perhaps there should be a clarification of which include dirs and library files you need to be able to compile this tutorial code? I spent a good hour wondering why I got linking errors, before I managed to dig up an old forum post that explained how to solve my problems...
Anyways, the library files you need are:
Also, OgreCEGUIRenderer.h is located in Samples/Common/CEGUIRenderer/include.
- With the new SDKs (at least the [http
- //1.4.6|1.4.6] VC2008 SDK), OgreCEGUIRenderer.h is located in samples/include. Nullmech 15:20, 27 February 2008 (GMT)]
I found out that the cleaning sequence proposed here :
delete mRenderer; delete mSystem;
gets me a segfault, and reversing the order of those deletions doesn't.
Maybe there's an error in the example. Can anyone look into this ?
While i received no segfault, I also had the same libraries issue. An additional section should certainly be added about the libraries included.
i had some problems ... they are all fixed now .. but I thought I might share..
- compiling and linking of the program all worked without problem.
- The program was faulting at runtime...
- the program would run ok by commenting out the lines in setupCEGUI().
- for me this was all caused by having ogre compiled with threads enabled (portage USE flag "threads"... i think it's ./configure option --enable-threading).. so CEGUI and ogre with threads enabled will not work.
gentoo x86_64 version 1.4.8 of ogre version 0.6.0 of CEGUI
RE: Link library's used
to get linking working, my code:blocks project required the library's:
"OgreMain" "OIS" "CEGUIBase" "CEGUIOgreRenderer" ( as OgreGUIRenderer didn't exit for me)
RE: Search Directories used
"/usr/include/OGRE" "/usr/include/CEGUI/" "/usr/include/OIS/"
Hi, first-time poster, how ya goin. Apologies in advance if my posting style sucks, or I end up violating a bunch of netiquette or wiki protocols, or anything.
By way of preamble, I'm in Ubuntu Intrepid, using Gedit + Plugins->External Tools->Build, and employing the makefile/make functionality described in "Setting Up An Application" under the "Gnu Compiler Collection (gcc) v3.x (using make)" subheading. I'm compiling with g++ version 4.3.2.
I got through the rest of the tutorials just fine, but then got to #6 and hit a brick wall. I think it is unclear and assumes too much programming experience. I mean, the rest of the tutorials do assume a little bit of prior programming experience, but they were at the right level to challenge us newbs without going overboard. Tutorial 6, though, is something else.
So, for those who come after, seeking answers here, my solution resided in modifying the makefile thus:
// Start of file
LIBS = OGRE OIS CEGUI-OGRE CEGUI
CXX = g++
CXXFLAGS = $(shell pkg-config --cflags $(LIBS)) $(DEFINES)
LD = g++
LDFLAGS = $(shell pkg-config --libs $(LIBS))
TUTORIAL = tutorial.cpp
$(LD) $(CXXFLAGS) $(LDFLAGS) $(TUTORIAL) -o tutorial
rm -f $(TUTORIAL) tutorial
// End of file
That's right. Despite what it says in the tutorial, if you are in Linux using "make," then you don't need to "make sure the following paths are in the include search paths directive: $(OGRE_HOME)\include, $(OGRE_HOME)\include\CEGUI, and $(OGRE_HOME)\samples\include", or "add CEGUIBase_d.lib and OgreGUIRenderer_d.lib to the linker dependencies." Neither do you have to "add CEGUIBase_d.lib OgreGUIRenderer_d.lib to linker>input>Additional Dependencies."
You just gotta add the names of some libraries to your makefile. Nice, huh?