Hello all, and I'm sorry for what will be an extremely basic post. I've been programming for years, but until just lately I've never tried to incorporate code created by anyone else, and I'm stuck on square one.
I cannot figure out how to use the CEGUI package and incorporate it into my own code. I add the Library and Include paths (I believe they are the right ones) to my project, include "CEGUI.h" in my files, and still I can't compile anything. I couldn't find anything in the documentation or on the forums with basic 'Setting up your IDE' info, and guides for other software packages don't seem to follow any steps I can generalize over.
I realize that me not knowing what the hell I'm doing is hardly CEGUI specific, but I'd appreciate any help. Just pointing me to where I can learn about setting up IDE's would be wonderful.
BEYOND the above, I also downloaded the precompiled CEGUI for VC++ 2010, and launched the included sample project. It let me compile that eventually, but upon trying to execute I get the following:
Unable to start program:'C:\CEGUI-SDK-0.7.5-vc10\projects\premake\Samples\common\....bin\CEGUISampleHelper.dll'
Which I also have no idea how to interpret.
So, final plea - any help will be greatly appreciated!
Help using CEGUI with Visual C++ Express 2010
Moderators: CEGUI MVP, CEGUI Team
Re: Help using CEGUI with Visual C++ Express 2010
Hi,
About setting up VC++ 2010, here's a simple way to do that, using property sheets (they'll allow you to add CEGUI paths faster to your projects mainly):
1. After opening your solution, go to the Property Manger tab (the tab is available at the bottom of the Solution Explorer's dock space)
2. Right click on your project, and select Add new property sheet
3. Select a place on your HDD where you'll store your local prop sheets
4. Right click the newly added prop sheet, and select Properties
5. Go to the C++ / General section
6. and add the path to the CEGUI's include file folder in the Additional Include Directories field
7. next, go to the Linker / General section
6. and add the path to the CEGUI's libraries folder in the Additional Library Directories field
If you want your property sheets to not be specific to your computer, you can set & use environment variables. Let's say the path to CEGUI is represented by the "CEGUI" environment vars, your include & lib path might be:
$(CEGUI)/include
$(CEGUI)/lib
Now, in your project's properties, in Debug configuration, get to the Linker / Input section, and add the libraries required for your project, like:
* CEGUIBase_d.lib
* CEGUIOpenGLRenderer_d.lib
* CEGUILuaScriptModule_d.lib (if you plan to use lua scripting module that is)
For Release configuration, add the same module, but without the _d trailing the lib file names'.
The first library might be added to the property sheet, as it is a requirement for any application using CEGUI.
Lastly, be sure to add the following dlls in the destination folder (example given for Debug target, using Debug CEGUI libraries):
CEGUIBase_d.dll
CEGUIExpatParser_d.dll
CEGUIFalagardWRBase_d.dll
CEGUIOpenGLRenderer_d.dll
CEGUISILLYImageCodec_d.dll
CEGUILuaScriptModule_d.dll (only if you've linked against CEGUILuaScriptModule_d.lib)
And of course, don't forget the datafiles folder specified for CEGUI in the work directory
About setting up VC++ 2010, here's a simple way to do that, using property sheets (they'll allow you to add CEGUI paths faster to your projects mainly):
1. After opening your solution, go to the Property Manger tab (the tab is available at the bottom of the Solution Explorer's dock space)
2. Right click on your project, and select Add new property sheet
3. Select a place on your HDD where you'll store your local prop sheets
4. Right click the newly added prop sheet, and select Properties
5. Go to the C++ / General section
6. and add the path to the CEGUI's include file folder in the Additional Include Directories field
7. next, go to the Linker / General section
6. and add the path to the CEGUI's libraries folder in the Additional Library Directories field
If you want your property sheets to not be specific to your computer, you can set & use environment variables. Let's say the path to CEGUI is represented by the "CEGUI" environment vars, your include & lib path might be:
$(CEGUI)/include
$(CEGUI)/lib
Now, in your project's properties, in Debug configuration, get to the Linker / Input section, and add the libraries required for your project, like:
* CEGUIBase_d.lib
* CEGUIOpenGLRenderer_d.lib
* CEGUILuaScriptModule_d.lib (if you plan to use lua scripting module that is)
For Release configuration, add the same module, but without the _d trailing the lib file names'.
The first library might be added to the property sheet, as it is a requirement for any application using CEGUI.
Lastly, be sure to add the following dlls in the destination folder (example given for Debug target, using Debug CEGUI libraries):
CEGUIBase_d.dll
CEGUIExpatParser_d.dll
CEGUIFalagardWRBase_d.dll
CEGUIOpenGLRenderer_d.dll
CEGUISILLYImageCodec_d.dll
CEGUILuaScriptModule_d.dll (only if you've linked against CEGUILuaScriptModule_d.lib)
And of course, don't forget the datafiles folder specified for CEGUI in the work directory
Re: Help using CEGUI with Visual C++ Express 2010
Thanks for looking at this!
You lost me a bit at the end there:
What do you mean by 'destination folder?' Is that the folder that the program is compiled to? I have placed those dll's (minus the Lua one) into the Debug folder within the project folder.
All other steps were completed.
However, in attempting to compile the following code:
I get the following errors:
Which were the same errors I got before. I've tried including other .h files such as CEGUIBase or CEGUIALL, but nothing changes.
You lost me a bit at the end there:
Lastly, be sure to add the following dlls in the destination folder (example given for Debug target, using Debug CEGUI libraries):
What do you mean by 'destination folder?' Is that the folder that the program is compiled to? I have placed those dll's (minus the Lua one) into the Debug folder within the project folder.
All other steps were completed.
However, in attempting to compile the following code:
Code: Select all
#include "CEGUI.h"
using namespace std;
int main(int argc, char argv[])
{
CEGUI::OpenGLRenderer* myRenderer = new CEGUI::OpenGLRenderer( 0 );
return 0;
}
I get the following errors:
Code: Select all
1>------ Build started: Project: Nobilis Resource Manager, Configuration: Debug Win32 ------
1> Manager.cpp
1>c:\documents and settings\the master\my documents\visual studio 2010\projects\nobilis resource manager\nobilis resource manager\manager.cpp(8): error C2039: 'OpenGLRenderer' : is not a member of 'CEGUI'
1>c:\documents and settings\the master\my documents\visual studio 2010\projects\nobilis resource manager\nobilis resource manager\manager.cpp(8): error C2065: 'OpenGLRenderer' : undeclared identifier
1>c:\documents and settings\the master\my documents\visual studio 2010\projects\nobilis resource manager\nobilis resource manager\manager.cpp(8): error C2065: 'myRenderer' : undeclared identifier
1>c:\documents and settings\the master\my documents\visual studio 2010\projects\nobilis resource manager\nobilis resource manager\manager.cpp(8): error C2039: 'OpenGLRenderer' : is not a member of 'CEGUI'
1>c:\documents and settings\the master\my documents\visual studio 2010\projects\nobilis resource manager\nobilis resource manager\manager.cpp(8): error C2061: syntax error : identifier 'OpenGLRenderer'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Which were the same errors I got before. I've tried including other .h files such as CEGUIBase or CEGUIALL, but nothing changes.
Re: Help using CEGUI with Visual C++ Express 2010
This is a very common question I think we should write it in flashing letters somewhere.
CEGUI.h includes everything from the core CEGUI (CEGUIBase). You have to include the OpenGL renderers headers separately.
It's RendererModules/OpenGL/CEGUIOpenGLRenderer.h
I would also advise you to use OpenGLRenderer::bootstrapSystem
CEGUI.h includes everything from the core CEGUI (CEGUIBase). You have to include the OpenGL renderers headers separately.
It's RendererModules/OpenGL/CEGUIOpenGLRenderer.h
I would also advise you to use OpenGLRenderer::bootstrapSystem
Re: Help using CEGUI with Visual C++ Express 2010
Ah hah, yes. I remember seeing you mention the bootstrap system to others in my forum searches. And thank you for doing it again! I had to be reminded, and now at least I've got a scrap of code that will compile.
I'd suggest updating the tutorials linked to in the beginner section and from the wiki tutorial page itself, actually. They make no mention of the bootstrap system, though the actual .html docs do. If I ever became proficient enough to feel up to it, expanding the beginner help sections would be a main priority for me.
Thank you both again! No doubt I'll be back soon with more inane questions.
I'd suggest updating the tutorials linked to in the beginner section and from the wiki tutorial page itself, actually. They make no mention of the bootstrap system, though the actual .html docs do. If I ever became proficient enough to feel up to it, expanding the beginner help sections would be a main priority for me.
Thank you both again! No doubt I'll be back soon with more inane questions.
Re: Help using CEGUI with Visual C++ Express 2010
IrmatDen wrote:Hi,
About setting up VC++ 2010, here's a simple way to do that, using property sheets (they'll allow you to add CEGUI paths faster to your projects mainly):
1. After opening your solution, go to the Property Manger tab (the tab is available at the bottom of the Solution Explorer's dock space)
2. Right click on your project, and select Add new property sheet
3. Select a place on your HDD where you'll store your local prop sheets
4. Right click the newly added prop sheet, and select Properties
5. Go to the C++ / General section
6. and add the path to the CEGUI's include file folder in the Additional Include Directories field
7. next, go to the Linker / General section
6. and add the path to the CEGUI's libraries folder in the Additional Library Directories field
If you want your property sheets to not be specific to your computer, you can set & use environment variables. Let's say the path to CEGUI is represented by the "CEGUI" environment vars, your include & lib path might be:
$(CEGUI)/include
$(CEGUI)/lib
Now, in your project's properties, in Debug configuration, get to the Linker / Input section, and add the libraries required for your project, like:
* CEGUIBase_d.lib
* CEGUIOpenGLRenderer_d.lib
* CEGUILuaScriptModule_d.lib (if you plan to use lua scripting module that is)
For Release configuration, add the same module, but without the _d trailing the lib file names'.
The first library might be added to the property sheet, as it is a requirement for any application using CEGUI.
Lastly, be sure to add the following dlls in the destination folder (example given for Debug target, using Debug CEGUI libraries):
CEGUIBase_d.dll
CEGUIExpatParser_d.dll
CEGUIFalagardWRBase_d.dll
CEGUIOpenGLRenderer_d.dll
CEGUISILLYImageCodec_d.dll
CEGUILuaScriptModule_d.dll (only if you've linked against CEGUILuaScriptModule_d.lib)
And of course, don't forget the datafiles folder specified for CEGUI in the work directory
Hello, I am using Visual Studio 2010 and have followed all the instructions above, but my #include "CEGUI.h" still doesn't recognize CEGUI.h... Is it different to set it up using visual studio 2010 ? I see you are explaining for Visual C++ express 2010... I don't know if there's any difference but I really need help on this, I have no idea how to build/install CEGUI to use in my visual studio 2010 projects..
Thanks,
Rafid
Re: Help using CEGUI with Visual C++ Express 2010
The same process applies to the non-express edition. I could only recommend you to go over all those steps once more and check carefully what you've done.
Also, you can check the command line used by the compiler:
* Go to Project's properties
* C/C++ section, Command line subsection
If CEGUI's include directory does not appear there, then you've missed a step, otherwise, well, check that CEGUI.h really is in the CEGUI's folder(s) listed in this command line.
Also, you can check the command line used by the compiler:
* Go to Project's properties
* C/C++ section, Command line subsection
If CEGUI's include directory does not appear there, then you've missed a step, otherwise, well, check that CEGUI.h really is in the CEGUI's folder(s) listed in this command line.
Re: Help using CEGUI with Visual C++ Express 2010
I assume you are getting the 'no such file exists?' error?
The simplest way to add an include path (that I know of) is to:
1. go to Projects -> Properties
2. Under Configuration Properties, select C/C++
3. Under General, look at the right-side pane. The very top option should be 'additional include directories'.
4. Make sure a new entry in that points to the folder in which you find the CEGUI.H file.
This doesn't use property sheets or any even remotely fancy method, so it should be bullet-proof. Of course, being new to VC++, I'm hardly an expert.
The simplest way to add an include path (that I know of) is to:
1. go to Projects -> Properties
2. Under Configuration Properties, select C/C++
3. Under General, look at the right-side pane. The very top option should be 'additional include directories'.
4. Make sure a new entry in that points to the folder in which you find the CEGUI.H file.
This doesn't use property sheets or any even remotely fancy method, so it should be bullet-proof. Of course, being new to VC++, I'm hardly an expert.
Who is online
Users browsing this forum: No registered users and 8 guests