Page 1 of 1
Building a project using Anjuta (a fast tutorial)
Posted: Mon Jun 28, 2004 7:09 am
by asterick
I'm simply posting this here because I've yet to find it anywhere else, this is just going to be a quick and dirty, so if anyone else wants to clean it up and make it more friendly, feel free. I'm also writting this with the build 1.2.2 in mind, your version may vary.
Step 1:
Create a new project using the opening window, or using
File->New Project. This will load up the application wizard
Step 2:
Click next, then select
"Generic / Terminal", next again, and fill in the fields as you see fit. Select either
"C++" or
"Both C and C++" as your project type, and be sure to make your project and executable target. All the remaining values are up to you.
Step 3:
After you have your base project, go to
Project -> Configure Project. Select the
Configuration tab. Under this sub-view, select
Libraries
You should be presented with a large, empty box, simply paste this code into it:
Code: Select all
PKG_CHECK_MODULES(ogre, [OGRE >= 0.14])
AC_SUBST(ogre_CFLAGS)
AC_SUBST(ogre_LIBS)
Press 'apply' and 'ok'
Step 4:
Go to
Settings -> Compiler and linker options. Select the Options tag, and enter
${ogre_CFLAGS} in Compiler Flags, and
${ogre_LIBS} in Linker Flags.
Step 5:
Go to
Build -> Auto Generate . This will reconfigure autoconf to allow for ogre. If you want to use an ExampleApplication, you should simply copy ExampleApplication.h and ExampleFrameListener.h to your project directory, but I don't advise using these unless you are beginning with ogre.
Enjoy!

Posted: Mon Jun 28, 2004 1:48 pm
by sinbad
Very cool, thanks!
Posted: Wed Aug 11, 2004 1:47 am
by Flandry
This is good stuff, but kinda lost in the fora. How about a "Linux Particulars" sub forum? Or alternatively, a link from "Tutorials". I found the tutorials fairly worthless WRT starting in linux.
Posted: Wed Aug 11, 2004 5:21 am
by bana
I agree, this tutorial started me on my way quickly and painlessly. Perhaps at least stickied?
Posted: Mon Aug 16, 2004 1:08 am
by bana
Has anyone found a way to make the current Samples into Anjuta projects? I tried importing a Sample (Terrain) but it won't auto-generate.
Also, whenever I create a new project, the Project options are fine (with the three lines in the libraries tab) yet the Compiler options CFLAGS and LDFLAGS I have to add every time. Is there a way to stick this for good?
Posted: Sat Sep 11, 2004 9:56 am
by shul
edit: I got no more questions, if you have one of the below problems check out the solutions in this post as well
Hi,
Thanks for the nice set of guidelines, I've install anjuta 1.2.2 on my gentoo box, and I get this message trying to run configure (both from anjuta and the console):
Code: Select all
configure: error: Library requirements (OGRE) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
edit: writing on gentoo:
Code: Select all
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
Does the trick, but now I have a new problem, while trying to compile the code at
http://ogre.digitalsentience.com/wiki/i ... uidetoOGRE
(I defined EXT_HASH)
I get :
Code: Select all
make[2]: Entering directory `/home/shul/Projects/OgreTry/src'
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include/OGRE -DEXT_HASH -Wall -g -c main.cc
In file included from /usr/local/include/OGRE/OgreException.h:31,
from /usr/local/include/OGRE/Ogre.h:30,
from main.cc:2:
/usr/local/include/OGRE/OgreString.h:73: error: syntax error before `::' token
/usr/local/include/OGRE/OgreString.h:74: error: ISO C++ forbids declaration of
`operator()' with no type
ok.. to avoid the above declare GCC_3_1 as well, also, point to the Common folder in the included samples and remove the MessageBox line (replace with printf or something)
Posted: Sun Oct 31, 2004 11:37 am
by DWORD
I'm sorry to ask this question here, but I can't find the answer elsewhere. So, where do I put "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/"? I tried ~/.bashrc, ~/.bash_profile, and /etc/profile but it doesn't seem to work. It never gets defined inside anjuta running ./autogen.sh
edit: I'm using debian if that matters.
edit: Ok, putting it before
Code: Select all
PKG_CHECK_MODULES(ogre, [OGRE >= 0.14])
AC_SUBST(ogre_CFLAGS)
AC_SUBST(ogre_LIBS)
works. Is this the way to do it?
Posted: Sun Oct 31, 2004 5:51 pm
by SomeFusion
Does Anjuta's Code Completion work well with Ogre?
Posted: Fri Dec 24, 2004 2:43 am
by bana
It seems to work alright, I've never done any work with another compiler (except vim and gedit) so I can't really say however.
Posted: Mon Feb 21, 2005 4:27 pm
by waxor
There is a complete working anjuta project available here:
http://waxor.com/page/ogre-dome.tgz
Should have everything you need to get started.
[/quote]
Posted: Mon Apr 11, 2005 12:02 am
by Kezzer
Can we get one of these for Code::Blocks?

Posted: Mon Apr 11, 2005 1:19 am
by sinbad
How about starting with the sample projects and working from there?
Posted: Fri Jul 01, 2005 12:02 am
by Ceacy
Just a little update, for Ogre 1.0.x and CEGUI :
Step 3 :
Code: Select all
PKG_CHECK_MODULES(ogre, [OGRE >= 1.0])
AC_SUBST(ogre_CFLAGS)
AC_SUBST(ogre_LIBS)
PKG_CHECK_MODULES(ceguiogre, [CEGUI-OGRE >= 1.0])
AC_SUBST(ceguiogre_CFLAGS)
AC_SUBST(ceguiogre_LIBS)
PKG_CHECK_MODULES(cegui, [CEGUI >= 0.2.0])
AC_SUBST(cegui_CFLAGS)
AC_SUBST(cegui_LIBS)
Step 4 :
Compiler flags :
Code: Select all
${ogre_CFLAGS} ${cegui_CFLAGS} ${ceguiogre_CFLAGS}
Linker flags :
Code: Select all
${ogre_LIBS} ${cegui_LIBS} ${ceguiogre_LIBS}
Note : this is for anjuta 1.2.x (stable branch) ; I didn't find how to do the same thing with anjuta 2.0.1 : if someone has an idea ...
Hi there...
Posted: Thu Aug 10, 2006 5:39 pm
by hecato
First post

...
The "little update, for Ogre 1.0.x and CEGUI" work ok, tougth dont know what to do from there :S.
OK, the question.
Im beginning in this, also don't understand mucha about programming in Linux... like the error Im getting now...
My system: ubuntu for AMD 64, nvidia video integrated.
I have installed the nvidia-xgl, and runned xgl and xglgears and run OK.
I have downloaded all the things for anjuta to work, gcc, g++.
I have downloaded the ogre libs, and cegui libs.
I have downloaded the zip file of the anterior example ogre-dome.tgz and say "... can't open waxor ..." or some like that, that can be fixed deleting the "waxor" paths from compiler & linker settings the paths for headers and libs.
After that come the problem, I hit build and here is the output... (is a translation from spanish to english).
Compiling source folder of the project: Dome ...
make
make: *** There is no rule for build objetive `@MAINTAINER_MODE_TRUE@', required for `Makefile.in'. Stop.
Completed ... incorrectly
Elapsed time: 3 secs
Hope you know what the problem is.
excellent... excellent...
Posted: Tue Nov 07, 2006 11:56 am
by irgendwo
after trying to get ogre working as I wish it to on a windows setup.... it works great when you are just using ogre... but as soon as I tried to interface the ogre stuff with other stuffs I began to run into the limitations of windows as a development platform... and they say linux has dependency hell.. hehe.... excellent excellent... very nice...
this worked perfectly thanks author
