Im going cross-platform!

A place for Ogre users to discuss non-Ogre subjects with friends from the community.
Post Reply
User avatar
lonewolff
Ogre Magi
Posts: 1207
Joined: Wed Dec 28, 2005 12:58 am
x 6

Im going cross-platform!

Post by lonewolff »

Hey all!

I have been away from the Ogre scene for a little bit now and I have just decided that I am going to get back into it and go cross platform. Seeing as Vista runs like a slug on most systems, this has prompted me to (try) and step away from Microsoft and write programs to run on a Windows and Linux enviroment.

Wish me luck! :lol:
capture
Goblin
Posts: 237
Joined: Sun Nov 20, 2005 2:44 pm

fun

Post by capture »

What distributions do you think you are going to use?
User avatar
lonewolff
Ogre Magi
Posts: 1207
Joined: Wed Dec 28, 2005 12:58 am
x 6

Post by lonewolff »

I am looking at Fedora 8 and possibly Ubuntu at this stage.
User avatar
twilight17
Goblin
Posts: 297
Joined: Thu Aug 23, 2007 3:47 am
x 1

Post by twilight17 »

I say get Ubuntu as they just released an update and it's a beautiful OS. Very stable, responsive, and doesn't use a lot of resources. I've tried fedora on the LiveCD and it seem slow (Compared to Ubuntu LiveCD)


Just my $0.02 :lol:
User avatar
lonewolff
Ogre Magi
Posts: 1207
Joined: Wed Dec 28, 2005 12:58 am
x 6

Post by lonewolff »

Fedora 8 seems to run fairly quickly on my AMD 2000+ system.
I seem to remember Fedora 5 (the last time I installed Fedora :lol:) ran fairly slowly.

I must admit I was impressed when I used Ubuntu on the same machine last weekend. It seemed to be fairly responsive. 8)
User avatar
nullsquared
Old One
Posts: 3245
Joined: Tue Apr 24, 2007 8:23 pm
Location: NY, NY, USA
x 11

Post by nullsquared »

lonewolff wrote:Fedora 8 seems to run fairly quickly on my AMD 2000+ system.
I seem to remember Fedora 5 (the last time I installed Fedora :lol:) ran fairly slowly.

I must admit I was impressed when I used Ubuntu on the same machine last weekend. It seemed to be fairly responsive. 8)
OT: Your fairly frequent use of the word fairly quickly caught my eye :lol:
User avatar
lonewolff
Ogre Magi
Posts: 1207
Joined: Wed Dec 28, 2005 12:58 am
x 6

Post by lonewolff »

Haha!
I just noticed that too :lol:

I guess in this case 'fairly' would mean 'nothing substantial'.
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Post by Kencho »

I've been using Ubuntu for more than a year for my development environment, and I'm quite happy with it. My suggestion so far :)
Image
User avatar
FrameFever
Platinum Sponsor
Platinum Sponsor
Posts: 414
Joined: Fri Apr 27, 2007 10:05 am

Post by FrameFever »

I like especially the realtime zoom, this is damn amazing! Definitly the best feature of Ubuntu.
User avatar
detox
Greenskin
Posts: 103
Joined: Thu Sep 07, 2006 1:13 am
Location: Ohio, USA
Contact:

Post by detox »

Good deal!

I run Ubuntu and am very happy with it. The only issue I ever had was with a cheap wireless networking card. Even the windows drivers were terrible for it though, so I can't really blame it on Linux/Ubuntu.

Codeblocks has a nice distro package for ubuntu too now. :D It's very nice. Setting up the nightly builds was a pain.
User avatar
lonewolff
Ogre Magi
Posts: 1207
Joined: Wed Dec 28, 2005 12:58 am
x 6

Post by lonewolff »

Well, I did it. :D

I went for Ubuntu (after initially trying to go with Fedora 8 - I had trouble with OIS and couldn't get it to work :twisted: ).

I now have Ogre up and running and am using Code::Blocks as my IDE.

Not too long and i'll be able to almost throw away my windows box :lol:
This is going to be great. I am eager on seeing how easily I can convert my Winsock API I made up, so it will run under BSD sockets. Should be easy enough, I think. 8)

Silly question, though. Now that I have Ogre, OIS, and CEGUI up and running. How does Code::Blocks just know where the include files etc are located? Is there an enviroment variable or path setup somewhere in a conf file that is being loaded on boot up? As the only path to any include directories is 'samples/include' for the 'ExampleApplication' requirements. All is working though. So, no complaints. I would just like to know how it does tie in under linux.
User avatar
pjcast
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2543
Joined: Fri Oct 24, 2003 2:53 am
Location: San Diego, Ca
x 2
Contact:

Post by pjcast »

Perhaps it has /usr/local as include base path? So when you do include <OIS/whatever.h> it finds it like that. Not sure, but also some distros have that as added include path (but not all) IIRC.

You can also manually add include/lib paths to Code::Blocks project files.
Have a question about Input? Video? WGE? Come on over... http://www.wreckedgames.com/forum/
User avatar
lonewolff
Ogre Magi
Posts: 1207
Joined: Wed Dec 28, 2005 12:58 am
x 6

Post by lonewolff »

Ok. I'll have a look.

Hey pjcast, with regards to that Fedora 8 / OIS issue I had. I'll fire up my other hard drive with it on and send over that build log. So, then you may be able to see what went wrong. :)
User avatar
AndyCR
Greenskin
Posts: 100
Joined: Sat Dec 23, 2006 11:27 pm

Post by AndyCR »

lonewolff wrote:How does Code::Blocks just know where the include files etc are located? Is there an enviroment variable or path setup somewhere in a conf file that is being loaded on boot up? As the only path to any include directories is 'samples/include' for the 'ExampleApplication' requirements. All is working though. So, no complaints. I would just like to know how it does tie in under linux.
GCC under Linux automatically looks for include files in /usr/include.

By the way, you might try Eclipse at some point to see if you like it - it has autocompletion like Visual C++ and many more features. Make sure you get the version from Eclipse.org (direct link to the C++ version: http://www.eclipse.org/downloads/downlo ... gtk.tar.gz ) and not from the Ubuntu repositories, though; the one in the repositories is old. While you're at it grab sun-java5-jre from the repositories. :)
User avatar
lonewolff
Ogre Magi
Posts: 1207
Joined: Wed Dec 28, 2005 12:58 am
x 6

Post by lonewolff »

AndyCR wrote:GCC under Linux automatically looks for include files in /usr/include.

By the way, you might try Eclipse at some point to see if you like it - it has autocompletion like Visual C++ and many more features.
Thanks for the heads up on usr/include.
I'll download Eclipse and check it out. It sounds good. :D
User avatar
AndyCR
Greenskin
Posts: 100
Joined: Sat Dec 23, 2006 11:27 pm

Post by AndyCR »

Just to give you a slightly more in-depth explanation of how Linux works for development:

Linux is set up so that development libraries more or less become a part of the system. Include files from all development libraries go in either /usr/include or /usr/local/include (rarely), and /usr/include is automatically added to the include paths for any given compile. With some libraries (such as OGRE), the files aren't stored directly in /usr/include; in the case of Ogre they are stored either in /usr/include/OGRE or /usr/local/include/OGRE, and so you have to have "-I/usr/include/OGRE" in your compile options so GCC can find the include files. (Be careful - Linux filenames -are- case-sensitive!)

The same is true of /usr/lib. Programs, when installed, put their library files in /usr/lib; on Linux, .so files are more or less a combination of both .dll and .lib on Windows; you both link to them and use them as dynamic libraries.

Programs on Linux often use many of these .so files, just as Windows programs use many DLL libraries; on Windows, the DLL versions required to run a program are usually included with the program itself, but on Linux the distro maintainer is expected to recompile each program according to the library versions they use. This results in a much slimmer install size but quite a bit of headaches when it comes to distributing programs; you more or less -have- to compile a version for each major distribution, since even if you included the .so files you use they may very well depend on .so files the target system does not have, and so in in a chain.

I personally prefer Linux to Windows for daily development work. I like the many things which are difficult to do on Windows without third-party software but are very easy on Linux ("I wonder where the CEGUI Ogre library went... Ah, locate *CEGUI*.so | grep Ogre", SSH is extremely useful, etc.). I like Eclipse significantly more than any version of Visual C++ I have ever used, but Linux isn't without it's quirks; I've used it for 6 years so far and have gotten quite used to them, but I can see how a new user trips on so many small things that are extremely different from things over on the Windows side of things.
User avatar
lonewolff
Ogre Magi
Posts: 1207
Joined: Wed Dec 28, 2005 12:58 am
x 6

Post by lonewolff »

Thanks fro the insight AndyCR. 8)

I am really going to try hard to embrace Ubuntu. Even last night I scored a virus under windows (which the crappy virus checker didn't worry about until it was too late). So, I booted into Linux and all was good, no viruses or spyware nagging at me.

It is slowly getting to the point where feel more at home under linux. :)

Possibly, the real challenge will be convincing my wife to change as we share the same PC :?
User avatar
barsandcat
Gnoblar
Posts: 2
Joined: Tue May 01, 2007 5:20 pm
Contact:

Post by barsandcat »

It is important that your code builds on widows and on linux all the time.
To achieve that I set up KVM on my KUbuntu and run Vista in it. Working copy is shared with samba. So i just build project with Code::Blocks, switch to Vista and build it with Visual C++ 2005.
No reboot!
Image
thbusch
Gnoblar
Posts: 14
Joined: Fri Sep 08, 2006 9:42 am
Location: Thüringen/Germany
Contact:

Post by thbusch »

if i remember correctly you have to tell ubuntu to look in /usr/local/lib for dynamic libs if you compile ogre from source, because it puts it's .so files there
i could be wrong, its long ago since i configured my dev environment...

/thomas
Post Reply