Page 1 of 1

Im going cross-platform!

Posted: Sun Apr 27, 2008 1:14 am
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:

fun

Posted: Sun Apr 27, 2008 1:32 am
by capture
What distributions do you think you are going to use?

Posted: Sun Apr 27, 2008 1:47 am
by lonewolff
I am looking at Fedora 8 and possibly Ubuntu at this stage.

Posted: Sun Apr 27, 2008 2:49 am
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:

Posted: Sun Apr 27, 2008 11:22 am
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)

Posted: Sun Apr 27, 2008 1:55 pm
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:

Posted: Sun Apr 27, 2008 9:34 pm
by lonewolff
Haha!
I just noticed that too :lol:

I guess in this case 'fairly' would mean 'nothing substantial'.

Posted: Sun Apr 27, 2008 9:54 pm
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 :)

Posted: Sun Apr 27, 2008 10:35 pm
by FrameFever
I like especially the realtime zoom, this is damn amazing! Definitly the best feature of Ubuntu.

Posted: Tue Apr 29, 2008 6:59 pm
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.

Posted: Sat May 10, 2008 12:49 am
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.

Posted: Sat May 10, 2008 12:53 am
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.

Posted: Sat May 10, 2008 12:59 am
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. :)

Posted: Sat May 10, 2008 5:46 pm
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. :)

Posted: Sun May 11, 2008 12:14 am
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

Posted: Sun May 11, 2008 6:37 am
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.

Posted: Thu May 15, 2008 3:29 am
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 :?

Posted: Thu May 29, 2008 2:58 pm
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!

Posted: Thu May 29, 2008 4:44 pm
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