Page 1 of 2
Standard libraries and Tutorial example compilation [SOLVED]
Posted: Wed Dec 10, 2008 11:57
by reixons
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
Thanks a lot.
Posted: Wed Dec 10, 2008 12:03
by kewur
urm, which tutorial are you talking about exactly?
Posted: Wed Dec 10, 2008 22:10
by Sairon
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.
Posted: Wed Dec 10, 2008 22:18
by CrazyEddie
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.
Posted: Thu Dec 11, 2008 18:46
by reixons
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
Posted: Thu Dec 11, 2008 19:44
by CrazyEddie
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.
Posted: Thu Dec 11, 2008 22:04
by reixons
Thanks again!!!
Posted: Fri Dec 12, 2008 09:59
by CrazyEddie
No problemo
Posted: Fri Dec 12, 2008 20:43
by Sairon
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
Posted: Sun Dec 14, 2008 11:45
by CrazyEddie
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).
Posted: Sun Dec 14, 2008 22:22
by Pompei2
I think it's ok to keep them separate, users just need to open their eyes and they will see.
Posted: Mon Dec 15, 2008 13:53
by pkrcel
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
Posted: Mon Dec 15, 2008 14:52
by CrazyEddie
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.
Posted: Mon Dec 15, 2008 19:46
by pkrcel
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.
Posted: Mon Jan 05, 2009 16:47
by starkos
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)