Standard libraries and Tutorial example compilation [SOLVED]

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

reixons
Just popping in
Just popping in
Posts: 12
Joined: Fri Nov 28, 2008 21:40

Standard libraries and Tutorial example compilation [SOLVED]

Postby reixons » Wed Dec 10, 2008 11:57

Hi! I am sure that my question will be easy for you.
I would like to know the "#includes" I have to use for the final tutorial aplication and what libraries I should install and lastly what command should I use to compile and link my file.

I wish you understood my question :D

Thanks a lot.
Last edited by reixons on Thu Dec 11, 2008 22:05, edited 1 time in total.

kewur
Just popping in
Just popping in
Posts: 17
Joined: Fri Dec 05, 2008 00:05

Postby kewur » Wed Dec 10, 2008 12:03

urm, which tutorial are you talking about exactly?

Sairon
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Sun Dec 07, 2008 01:11

Postby Sairon » Wed Dec 10, 2008 22:10

When on the matter of the tutorials / samples. I think it would be nice if a VS solution file would be supplied, sure one can manually set this up and create a project for every sample, but it would be sweet if this came from the get go.

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

Postby CrazyEddie » Wed Dec 10, 2008 22:18

Sairon wrote:When on the matter of the tutorials / samples. I think it would be nice if a VS solution file would be supplied, sure one can manually set this up and create a project for every sample, but it would be sweet if this came from the get go.

If you're talking about our samples that come with CEGUI, if you are using the source packages / svn code, you can get premake to generate a solution for the CEGUI samples by executing one of the following in the makefiles/premake directory:
build_samples_vs2003.bat
build_samples_vs2005.bat
build_samples_vs2008.bat

Alternatively you can edit makefiles/premake/config.lua and set the option to include the samples in the main solution prior to generating the main solution.

If you're an SDK user, you should look in the Projects/Win directory ;)

HTH

CE.

reixons
Just popping in
Just popping in
Posts: 12
Joined: Fri Nov 28, 2008 21:40

Postby reixons » Thu Dec 11, 2008 18:46

I am talking about this one:
http://www.cegui.org.uk/wiki/index.php/ ... _Rendering
and the followings, so what I would like to know is what are the "#includes" I need to do to make it work and a standard "g++ ....." comand which made me compile the final work (when I get at the end of the tutorial)

THX

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

Postby CrazyEddie » Thu Dec 11, 2008 19:44

It depends on the renderer module, though for the OpenGL module you would likely need to use:

Code: Select all

#include <CEGUI.h>
#include <CEGUIDefaultResourceProvider.h>
#include <RendererModules/OpenGLGUIRenderer/openglrenderer.h>


If you're using xerces for the XML parser, and need to set the default schema resource group, then you'll also need:

Code: Select all

#include <XMLParserModules/XercesParser/CEGUIXercesParser.h>

(and here you'll also likely have to add the lib for the same to the link stage).

HTH

CE.

reixons
Just popping in
Just popping in
Posts: 12
Joined: Fri Nov 28, 2008 21:40

Postby reixons » Thu Dec 11, 2008 22:04

Thanks again!!!

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

Postby CrazyEddie » Fri Dec 12, 2008 09:59

No problemo ;)

Sairon
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Sun Dec 07, 2008 01:11

Postby Sairon » Fri Dec 12, 2008 20:43

CrazyEddie wrote:
Sairon wrote:When on the matter of the tutorials / samples. I think it would be nice if a VS solution file would be supplied, sure one can manually set this up and create a project for every sample, but it would be sweet if this came from the get go.

If you're talking about our samples that come with CEGUI, if you are using the source packages / svn code, you can get premake to generate a solution for the CEGUI samples by executing one of the following in the makefiles/premake directory:
build_samples_vs2003.bat
build_samples_vs2005.bat
build_samples_vs2008.bat

Alternatively you can edit makefiles/premake/config.lua and set the option to include the samples in the main solution prior to generating the main solution.

If you're an SDK user, you should look in the Projects/Win directory ;)

HTH

CE.


Ah, I missed the bats for the samples. Thx :)

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

Postby CrazyEddie » Sun Dec 14, 2008 11:45

Perhaps we should find a means to auto-run the samples batch file if the user is not including the samples as an all in one solution.

Perhaps we should do away with the separate core / samples solutions (can't remember why it was done like that).

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Sun Dec 14, 2008 22:22

I think it's ok to keep them separate, users just need to open their eyes and they will see.

pkrcel
Just popping in
Just popping in
Posts: 4
Joined: Mon Dec 15, 2008 10:43

Postby pkrcel » Mon Dec 15, 2008 13:53

Hi there,
I successfully used the premake script for the CEGUI solution, and both vs2008 and CB were built with no problem.

Now I was on the lane to generate the solution/workspace for the samples but the relative scripts fail saying the following

Code: Select all

E:\Programmi\Projects\CEGUI\CEGUI-0.6.2\makefiles\premake>premake --file samples.lua --target vs2008
** samples.lua: samples.lua:7: module 'helpers.lua' not found:
        no field package.preload['helpers.lua']
        no file '.\helpers\lua.lua'
        no file 'E:\Programmi\Projects\CEGUI\CEGUI-0.6.2\makefiles premake\lua\helpers\lua.lua'
        no file 'E:\Programmi\Projects\CEGUI\CEGUI-0.6.2\makefiles\premake\lua\helpers\lua\init.lua'
        no file 'E:\Programmi\Projects\CEGUI\CEGUI-0.6.2\makefiles\premake\helpers\lua.lua'
        no file 'E:\Programmi\Projects\CEGUI\CEGUI-0.6.2\makefiles\premake\helpers\lua\init.lua'
        no file '.\helpers\lua.dll'
        no file 'E:\Programmi\Projects\CEGUI\CEGUI-0.6.2\makefiles\premake\helpers\lua.dll'
        no file 'E:\Programmi\Projects\CEGUI\CEGUI-0.6.2\makefiles\premake\loadall.dll'
        no file '.\helpers.dll'
        no file 'E:\Programmi\Projects\CEGUI\CEGUI-0.6.2\makefiles\premake\helpers.dll'
        no file 'E:\Programmi\Projects\CEGUI\CEGUI-0.6.2\makefiles\premake\loadall.dll'
** Script failed to run, ending.

E:\Programmi\Projects\CEGUI\CEGUI-0.6.2\makefiles\premake>pause


but the helper.lua file is there, have I overlooked anything?

I downloaded the source package for 0.6.2, and used premake to generate first the viasual studio solution and then the Code::Blocks workspace.

In the latter I succeeded in fixing thigs so to compile all targets in CEGUI BaseSystem.

I do not know premake at all so I dunno how to proceed to fix the script.

Any idea or help would be very much appreciated.

Cheers
-Andy

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

Postby CrazyEddie » Mon Dec 15, 2008 14:52

Hi, and welcome :)

I just ran a couple of tests and can confirm there seems to be an issue with the version of premake I put into the source .zip file (3.7). So you have a couple of options:
1) Get different versions of premake until you find one that works, like 3.6
2) Edit the samples.lua file and change these lines:

Code: Select all

require("helpers.lua")
require("config.lua")

to

Code: Select all

dofile("helpers.lua")
dofile("config.lua")


HTH

CE.

pkrcel
Just popping in
Just popping in
Posts: 4
Joined: Mon Dec 15, 2008 10:43

Postby pkrcel » Mon Dec 15, 2008 19:46

Well, I was sorta on the same track, but didn't dare try myself due to my complete *nil* knowledge in premake.

Thanks a lot.

:D

starkos
Just popping in
Just popping in
Posts: 1
Joined: Mon Jan 05, 2009 16:44

Postby starkos » Mon Jan 05, 2009 16:47

CrazyEddie wrote:2) Edit the samples.lua file and change these lines:

Code: Select all

require("helpers.lua")
require("config.lua")

to

Code: Select all

dofile("helpers.lua")
dofile("config.lua")



Realize I'm coming in a bit late here, but I will take a look and see if I can figure out why 3.7 bit you like that. I did upgrade the version of Lua from 3.6, perhaps it is related to that?

Anyway, I'm not planning on making any new 3.x releases if I can help it, now that release candidates for 4.0 are available.

-st. (the author of Premake)


Return to “Help”

Who is online

Users browsing this forum: No registered users and 14 guests