Updated/reworked Linux section for the wiki

What it says on the tin: a place to discuss proposed new features.
Post Reply
User avatar
Svenstaro
Greenskin
Posts: 115
Joined: Fri Dec 15, 2006 1:30 pm
Location: Germany
x 3
Contact:

Updated/reworked Linux section for the wiki

Post by Svenstaro »

I know, this is one of those if-you-want-it-done-do-it-yourself things.
I totally would! It's just that I'm actually in need of help myself with compiling this thing for Ubuntu Feisty and getting it to work in Code::Blocks.
I eventually got it to compile but getting it to work in C::B is another beast and not well explained anywhere on the wiki.

A step-by-step guide for compiling Ogre and a second part for making it work in a recent C::B would be really, really neat and shouldn't take too long to write down if you know which screws to spin.
The Linux pages are a mess and outdated the way they currently are.
Please don't take this is a complaint only, requesting it this way is the only current option for me to help improve the wiki.

If you explain the steps to me here I'll do the wiki part.
User avatar
Game_Ender
Ogre Magi
Posts: 1269
Joined: Wed May 25, 2005 2:31 am
Location: Rockville, MD, USA

Post by Game_Ender »

If you know the concept behind the include paths, compiler options, linking libraries and how to set them up in Code::Blocks, and you know one of the build systems listed here you should be able to add Code::Blocks to that list. Or you could create a premake or CMake build file which could generate Code::Blocks projects for you.
User avatar
milliams
Gremlin
Posts: 172
Joined: Fri Feb 16, 2007 1:47 am
Location: Portsmouth, UK
Contact:

Post by milliams »

If you go the CMake route, I put together an example project using CMake on the Wiki at http://ogre3d.org/wiki/index.php/User:Milliams. I've heard Cmake and Code::Blocks work well together.
User avatar
Svenstaro
Greenskin
Posts: 115
Joined: Fri Dec 15, 2006 1:30 pm
Location: Germany
x 3
Contact:

Post by Svenstaro »

Well I don't have experience in any of those mentioned. This might sound a bit ignorant but my concern was getting Ogre to work with C::B and making a good wiki entry of it, not using work-arounds.
I just wanted to encourage those that do have the know-how already to make the start easier for the other Linux users by sharing their experience on the wiki.
Irrlicht for example worked almost out of the box in contrast to Ogre which is a struggle to set up.
Please try to understand my concern, this is not a rant.
I would really like to use Ogre for my projects and I think Ogre + C::B is a common choice for Linux devs so writing down an up-to-date guide might be a good idea.
User avatar
Game_Ender
Ogre Magi
Posts: 1269
Joined: Wed May 25, 2005 2:31 am
Location: Rockville, MD, USA

Post by Game_Ender »

Take it as a learning experience. Any developer of "worth his salt" should be able setup a project for Ogre given all the examples for Linux on the wiki. You said you don't have any understanding of those build system, so I will help you out.

If your environment is setup properly and pkg-config is installed "pkg-config OGRE --libs" will return everything the linker needs to link an Ogre program, and 'pkg-config OGRE --cflags' will return everything needed for the compiler to compile a source file using Ogre. With that information, a basic understanding of how to invoke GCC from the command line, and Code::Blocks you will be able to make a working Ogre project.

Note if ogre is not installed in /usr then you need to do the following (in this example Ogre is installed in /usr/local),

Code: Select all

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
# Now run pkg-config
Now you can just include those pkg-config calls in your Code::Blocks project file, or you take there output and turn it into settings in the project file. You can put them in the project settings by adding `pkg-config OGRE --cflags` in the compiler options and `pkg-config OGRE --libs` in the linker options.
Post Reply