Using CEGUI 0.7 with XCode

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

SunSailor
Just popping in
Just popping in
Posts: 5
Joined: Fri Oct 23, 2009 23:29

Using CEGUI 0.7 with XCode

Postby SunSailor » Fri Oct 23, 2009 23:51

I just started to use CEGUI and managed to setup the latest version with the 1.6.4. Now I want to create build systems for this project, which are working on all three of my target platforms, namely windows, linux and mac os. At the moment, I struggle with the XCode setup. Forgive, if I oversaw something very obvious, but I'm not only new to CEGUI, but to the whole mac os development cycle at all.
I managed to setup all other libraries I use, which are OGRE (1.6.4, built SDK), OIS (Taken from the OGRE SDK), irrKlang (1.1.3). They all compile fine with the basic framework I created. First off, when I try to add the CEGUIBase.framework to XCode, XCode crashes, every time, 100% reproducible. To prevent that, I started to add the parts manually, which caused the following compilation error:

Code: Select all

In file included from ../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/falagard/CEGUIFalTextComponent.h:32,
                 from ../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/falagard/CEGUIFalImagerySection.h:32,
                 from ../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/falagard/CEGUIFalWidgetLookFeel.h:33,
                 from /Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../../SDKs/OgreSDK/Dependencies/CEGUI.framework/Headers/falagard/CEGUIFalWidgetLookManager.h:34,
                 from /Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../../SDKs/OgreSDK/Dependencies/CEGUI.framework/Headers/CEGUI.h:66,
                 from /Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../src/application.h:18,
                 from /Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../src/application.cpp:2:
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/falagard/../CEGUIRenderedString.h:95: error: 'GeometryBuffer' has not been declared
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/falagard/../CEGUIRenderedString.h:117: error: expected ',' or '...' before '&' token
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/falagard/../CEGUIRenderedString.h:117: error: ISO C++ forbids declaration of 'RenderedStringComponent' with no type
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/falagard/../CEGUIRenderedString.h:166: error: 'RenderedStringComponent' was not declared in this scope
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/falagard/../CEGUIRenderedString.h:166: error: template argument 1 is invalid
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/falagard/../CEGUIRenderedString.h:166: error: template argument 2 is invalid
In file included from ../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/falagard/CEGUIFalTextComponent.h:34,
                 from ../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/falagard/CEGUIFalImagerySection.h:32,
                 from ../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/falagard/CEGUIFalWidgetLookFeel.h:33,
                 from /Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../../SDKs/OgreSDK/Dependencies/CEGUI.framework/Headers/falagard/CEGUIFalWidgetLookManager.h:34,
                 from /Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../../SDKs/OgreSDK/Dependencies/CEGUI.framework/Headers/CEGUI.h:66,
                 from /Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../src/application.h:18,
                 from /Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../src/application.cpp:2:
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/falagard/../CEGUIFormattedRenderedString.h:48: error: 'GeometryBuffer' has not been declared
In file included from ../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/falagard/CEGUIFalImagerySection.h:32,
                 from ../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/falagard/CEGUIFalWidgetLookFeel.h:33,
                 from /Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../../SDKs/OgreSDK/Dependencies/CEGUI.framework/Headers/falagard/CEGUIFalWidgetLookManager.h:34,
                 from /Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../../SDKs/OgreSDK/Dependencies/CEGUI.framework/Headers/CEGUI.h:66,
                 from /Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../src/application.h:18,
                 from /Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../src/application.cpp:2:
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/falagard/CEGUIFalTextComponent.h:238: error: ISO C++ forbids declaration of 'BiDiVisualMapping' with no type
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/falagard/CEGUIFalTextComponent.h:238: error: expected ';' before '*' token
In file included from /Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../../SDKs/OgreSDK/Dependencies/CEGUI.framework/Headers/elements/CEGUIListboxTextItem.h:32,
                 from /Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../../SDKs/OgreSDK/Dependencies/CEGUI.framework/Headers/CEGUI.h:85,
                 from /Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../src/application.h:18,
                 from /Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../src/application.cpp:2:
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/elements/CEGUIListboxItem.h:400: error: 'GeometryBuffer' has not been declared
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/elements/CEGUIListboxItem.h:445: error: ISO C++ forbids declaration of 'BiDiVisualMapping' with no type
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/elements/CEGUIListboxItem.h:445: error: expected ';' before '*' token
In file included from /Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../src/application.h:19,
                 from /Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../src/application.cpp:2:
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/CEGUI/RendererModules/Ogre/CEGUIOgreRenderer.h:195: error: ISO C++ forbids declaration of 'RenderingRoot' with no type
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/CEGUI/RendererModules/Ogre/CEGUIOgreRenderer.h:195: error: expected ';' before '&' token
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/CEGUI/RendererModules/Ogre/CEGUIOgreRenderer.h:196: error: ISO C++ forbids declaration of 'GeometryBuffer' with no type
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/CEGUI/RendererModules/Ogre/CEGUIOgreRenderer.h:196: error: expected ';' before '&' token
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/CEGUI/RendererModules/Ogre/CEGUIOgreRenderer.h:197: error: expected ',' or '...' before '&' token
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/CEGUI/RendererModules/Ogre/CEGUIOgreRenderer.h:197: error: ISO C++ forbids declaration of 'GeometryBuffer' with no type
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/CEGUI/RendererModules/Ogre/CEGUIOgreRenderer.h:199: error: ISO C++ forbids declaration of 'TextureTarget' with no type
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/CEGUI/RendererModules/Ogre/CEGUIOgreRenderer.h:199: error: expected ';' before '*' token
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/CEGUI/RendererModules/Ogre/CEGUIOgreRenderer.h:200: error: 'TextureTarget' has not been declared
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/CEGUI/RendererModules/Ogre/CEGUIOgreRenderer.h:236: error: ISO C++ forbids declaration of 'RenderingRoot' with no type
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/CEGUI/RendererModules/Ogre/CEGUIOgreRenderer.h:236: error: expected ';' before '*' token
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/CEGUI/RendererModules/Ogre/CEGUIOgreRenderer.h:238: error: ISO C++ forbids declaration of 'RenderTarget' with no type
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/CEGUI/RendererModules/Ogre/CEGUIOgreRenderer.h:238: error: expected ';' before '*' token
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/CEGUI/RendererModules/Ogre/CEGUIOgreRenderer.h:240: error: 'TextureTarget' was not declared in this scope
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/CEGUI/RendererModules/Ogre/CEGUIOgreRenderer.h:240: error: template argument 1 is invalid
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/CEGUI/RendererModules/Ogre/CEGUIOgreRenderer.h:240: error: template argument 2 is invalid
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/CEGUI/RendererModules/Ogre/CEGUIOgreRenderer.h:202: error: conflicting return type specified for 'virtual CEGUI::Texture& CEGUI::OgreRenderer::createTexture()'
/Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../../SDKs/OgreSDK/Dependencies/CEGUI.framework/Headers/CEGUIRenderer.h:168: error:   overriding 'virtual CEGUI::Texture* CEGUI::Renderer::createTexture()'
../../../../SDKs/CeGUI/Frameworks/Debug/CEGUIBase.framework/Headers/CEGUI/RendererModules/Ogre/CEGUIOgreRenderer.h:203: error: conflicting return type specified for 'virtual CEGUI::Texture& CEGUI::OgreRenderer::createTexture(const CEGUI::String&, const CEGUI::String&)'
/Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../../SDKs/OgreSDK/Dependencies/CEGUI.framework/Headers/CEGUIRenderer.h:190: error:   overriding 'virtual CEGUI::Texture* CEGUI::Renderer::createTexture(const CEGUI::String&, const CEGUI::String&)'
/Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../src/application.cpp: In constructor 'SpyActions::Application::Application()':
/Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../src/application.cpp:14: warning: unused variable 'logMgr'
/Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../src/application.cpp: In member function 'void SpyActions::Application::run()':
/Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../src/application.cpp:96: error: 'Sleep' was not declared in this scope


Maybe someone could give me a slight hint what I did wrong in both cases and how to solve them. I consider myself as an experienced programmer, but XCode itself is very complex and seems to me somehow different than other IDEs I used, so I'm pretty sure, I simply misunderstood some basic concepts.

Thanks in advance,
Andreas "SunSailor" Podgurski

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

Re: Using CEGUI 0.7 with XCode

Postby CrazyEddie » Sat Oct 24, 2009 08:17

I'm not sure why Xcode would crash; I've never seen that behaviour, so I'm not sure what exactly the set of conditions you have that create this are. Posting any messages might help (though might not).

To prevent that, I started to add the parts manually

What does this mean exactly? While I'm sure it's "obvious" to you what you're talking about, I personally have no idea at all :lol:

The nature of, and indeed the text of the error messages posted, tells me that the old non-0.7.0 framework is being pickup up from within the Ogre SDK distribution. Perhaps this causes all of the issues?

CE.

SunSailor
Just popping in
Just popping in
Posts: 5
Joined: Fri Oct 23, 2009 23:29

Re: Using CEGUI 0.7 with XCode

Postby SunSailor » Sat Oct 24, 2009 20:59

I simply added the include and the library path manually to the configuration, bypassing the framework mechanism completely. Actually, inside the ogre framework, there is no reference to CEGUI at all, as it is delivered as a separate framework package from there. At least not on file level - maybe deeper, I don't know, where exactly OGRE references to that other framework. How to get around that on the mac platform (Or maybe, what do I need to ask on the OGRE forum...)? Btw., XCode crashes here even with a newly created, empty project. I'm using the following XCode version 3.2:

Component versions
Xcode IDE: 1610.0
Xcode Core: 1608.0
ToolSupport: 1591.0

Any further help is very appreciated...

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

Re: Using CEGUI 0.7 with XCode

Postby CrazyEddie » Sat Oct 24, 2009 21:51

I also use Xcode 3.2 - I don't have the exact versions since I'm not on there at the moment ;)

When I mentioned things being picked up from the Ogre SDK, I was talking about the error lines that contain paths like this:

Code: Select all

/Users/apodgurski/Development/Spy Actions/build/macosx/Spy Actions/../../../../SDKs/OgreSDK/Dependencies/CEGUI.framework/Headers/CEGUI.h

where it clearly shows headers being picked up from the wrong place (since, as you know, the newer framework is called CEGUIBase.framework and not CEGUI.framework).

CE.

SunSailor
Just popping in
Just popping in
Posts: 5
Joined: Fri Oct 23, 2009 23:29

Re: Using CEGUI 0.7 with XCode

Postby SunSailor » Sat Oct 24, 2009 22:13

Yes, I know, I found that, too. But I can't find the specific reference, thus I could remove it. Any idea? I did a post on the ogre forum, too, as I have no idea from which side I can catch that issue best...
Edit: Ok, got the hint to use 1.7 and port it myself to mac os. Not really helping that far...

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

Re: Using CEGUI 0.7 with XCode

Postby CrazyEddie » Sun Oct 25, 2009 10:26

Ok. The best thing to do here is remove the item that is causing the issue "/Users/apodgurski/Development/SDKs/OgreSDK/Dependencies/CEGUI.framework"; when I say remove, I mean delete it completely. Once this is done you'll either get an idea of what was referencing that old framework, or at least get a new - and at more relevant - set of errors or issues to resolve.

With reference to the crashing issue and adding the framework manually (after reading your post in the Ogre forum), you'd have to add the include path anyway since we changed the framework name (this was mentioned on the pre-release porting page months before release, with a note to 'nag' us if anyone wanted it changed back - nobody nagged us, so the change is now permanent). The relevance of this is that lines like this:

Code: Select all

#include <CEGUI/CEGUI.h>

will not automatically work anymore by just adding the framework - you do need to add the framework headers location to the search path (somewhat unfortunately, though I wanted parity with the names of components across all platforms). I know you've already done this, but I wanted to be explicit that this is not a work-around but a required step (unless you use the CEGUIBase as the include prefix, which is not portable).

With reference to the above use of the 'CEGUI' prefix in include statements, this is not something we have ever encouraged. While I know the Ogre guys have always done this, it's something I absolutely detest; it's not the way we wanted people to address the includes - every header file already has a CEGUI prefix (like CEGUIWindow.h) so having this additional directory prefix is needless repetition. People relying on the outer directory being named CEGUI is a total pain in the arse - and eventually, perhaps for the 1.0.0 release, I will take steps to ensure this breaks.

CE.

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

Re: Using CEGUI 0.7 with XCode

Postby CrazyEddie » Sun Oct 25, 2009 15:08

Minor update (well, could be a major update - depending on your perspective :lol:)...

I have identified what I believe is the cause of the crash. Basically this follows on from what I said above about using a 'CEGUI' directory prefix in include statements. In an attempt to maintain some level of compatibility with people who do this, the CEGUI Xcode build creates a 'CEGUI' symlink back to it's containing directory (that being Headers in the framework) - it seems that this can send Xcode into an infinite loop of recursion and it is this that causes the crash of Xcode.

This symlink will now be removed from future versions (since we can't have such issues caused by our frameworks), and as a side effect of doing that, includes must not then use the CEGUI prefix at all - this change will be in effect from 0.7.1.

CE.

SunSailor
Just popping in
Just popping in
Posts: 5
Joined: Fri Oct 23, 2009 23:29

Re: Using CEGUI 0.7 with XCode

Postby SunSailor » Mon Oct 26, 2009 01:30

Ok, another update from my side. Your tip really helped, but now I ran into the problem, that there is only a 32bit binary SDK. Is there the possibility for a 64bit target for the 0.7.1, or even the present one? With Snow Leopard, the x64 platform is more the rule than the exception, or am I wrong with that? Nevertheless, at least all things compile now, only it doesn't start (not finding the dylib of CEGUIBase), but I need to dig a bit deeper into the configuration. I'm pretty sure, this is my fault yet. Thanks that far for the extensive help :).
Btw., what need I to change to test your estimation of the crash? I could verify that then.

Edit: Ok, I give up. I finally found out, that the framework needs to be added to the "Link Binary with Libraries" build phase, at least I believe it needs to, but don't get any useable result. This is what the gdb outputs:

Code: Select all

Loading program into debugger…
sharedlibrary apply-load-rules all
warning: Unable to read symbols for "@executable_path/../Frameworks/CEGUIBase.framework/Versions/A/CEGUIBase" (file not found).
warning: Unable to read symbols from "CEGUIBase" (not yet mapped into memory).
warning: Unable to read symbols for "@executable_path/../Frameworks/Ogre.framework/Versions/A/Ogre" (file not found).
warning: Unable to read symbols from "Ogre" (not yet mapped into memory).
warning: Unable to read symbols for "@executable_path/../Frameworks/CEGUIOgreRenderer.framework/Versions/A/CEGUIOgreRenderer" (file not found).
warning: Unable to read symbols from "CEGUIOgreRenderer" (not yet mapped into memory).
warning: Unable to read symbols for "/usr/local/lib/libirrklang.dylib" (file not found).
warning: Unable to read symbols from "libirrklang.dylib" (not yet mapped into memory).
Program loaded.
run
[Switching to process 1142]
Running…
dyld: Library not loaded: @executable_path/../Frameworks/CEGUIBase.framework/Versions/A/CEGUIBase
  Referenced from: /Users/apodgurski/Development/Spy Actions/build/macosx/build/Debug/Spy Actions.app/Contents/MacOS/Spy Actions
  Reason: image not found
No memory available to program now: unsafe to call malloc
Data Formatters temporarily unavailable, will re-try after a 'continue'. (The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on"
Evaluation of the expression containing the function (dlopen) will be abandoned.)
Previous frame inner to this frame (gdb could not unwind past this frame)
Previous frame inner to this frame (gdb could not unwind past this frame)


Adding the framework to the build step worked, this time even without a crash. Would be really great, if you could give me a hint, where my misunderstandings are located.

Thanks in advance,
Andreas "SunSailor" Podgurski


Return to “Help”

Who is online

Users browsing this forum: No registered users and 18 guests