Sign in to follow this  
TRYCORP

Setting up Development in Linux

Recommended Posts

With the continuing horror stories involving Vista's "features" I think I would like to try development for linux instead of taking into account many of Vista's neat little tricks. (Like sucking up 500 MB of RAM by iteself) Does anyone here know or know of a tuturial on how to setup your compiler, and libraries on linux. Specifically C++(latest gcc) and at the least the OpenGL library?

Share this post


Link to post
Share on other sites
Quote:
With the continuing horror stories involving Vista's "features" I think I would like to try development for linux instead of taking into account many of Vista's neat little tricks. (Like sucking up 500 MB of RAM by iteself)


I wouldn't be surprised if the horror stories you heard are either exagerated or just plain wrong, plus it's still beta software so the way stuff works now may not be how it works in the final version.

Anyway, sorry for that little deviation, on most linux distros a compiler and basic libraries are already installed and setup, NeHe has Linux ports of its tutorials which you can check out for specific GL code that runs on linux, if you don't like using the command line get hold of an IDE like KDevelop on Anjuta so you won't have to deal with it.

Share this post


Link to post
Share on other sites
You can download and install Ubuntu (http://www.ubuntu.com/), then install the following packages using synaptic: gcc, g++, libgl1-mesa-dev, libglu1-mesa-dev, xlibs-dev (this package might be called xlibs-static-dev in Breezy). Depending upon which graphics card you have, you might want to install the packages xorg-driver-fglrx (proprietary ATI radeon driver) or nvidia-glx (Nvidia driver).

That should have you pretty much set. If you run into trouble, make sure to search http://www.ubuntuforums.org/.

All of the above is of course assuming you'd like to run Ubuntu ;)...

Like Monder and DaBono suggested, if you like to use an IDE, look at KDevelop, Code::Blocks or Anjuta.
I've been considering trying an IDE, but for now I'm just using gedit, the default editor that comes with Gnome. It's simple, and it does things like syntax highlighting, though there is no debugging or "project solutions" as in visual studio.

PS: If you go for a distribution that offers a live-cd and you can spare a disk, try it first to see whether you have any problems. Wireless network cards can be especially hard to set up, and may require mucking about in a terminal.

Share this post


Link to post
Share on other sites
apt-get install anjuta

That should get you up and running quickly if you're using a GNOME desktop on a debian derative. Try creating a small project. I highly recommend using glade2 and libglade for GUI programs. Anjuta sets up most of the build process for you so you can focus on coding in the beginning.

When you have something up and running, copy your source code to a new directory, reorganise it in a proper way and recreate all the makefiles, configure.in, etcetera by hand. It's hard to get right but worth it in the end. You won't be stuck to Anjuta's way of organising your code and you'll have a much better understanding of the build process.

That's what I did and it served me well. Keeping the build process out of Anjuta has advantages and disadvantages. The biggest disadvantage is that you have to keep the build files up-to-date yourself, but you won't be stuck in Anjuta's way of doing things. Now I use anjuta purely as a rich text editor instead of a full IDE and jus compile from the command line. I might go shopping for another IDE that doesn't get in my way.

Share this post


Link to post
Share on other sites
I use code::blocks currently on windows and love it. With the Ubuntu install will everything be latest versions? Including gdb and everything. I'm not new to gcc or gdb by any means I have just been using them on Windows. I do use Slackware, but not for development. With Ubuntu coming up fast and if I'm not correct it doesn't support KDE defaultly anyway.

Also, 512 MB of ram into the operating system is what Microsoft has published as recommended. XP Pro only needs 64 and suggests 128. I have an idea! How about Microsoft make a fast OS instead of a hold my hand whilst I send my e-mail OS. Yeah, yeah, yeah, you can get different flavors, including thier "Starter" (AKA CRIPPLED!), but I don't want "newb 'I <3 AIM' edition", "business edition", "HOME business edition", "Dead End Job Edition", "Do your taxes at home edition", or the almight "ULTIMATE EDITION!!" /** Insert Angelic Choir Here */ which I'm sure is where they crammed every useless feature they had into one big 2 DVD install in order to create a 200 page feature manual or something.

But I want reliable, fast, and streamlined, in that order.

Share this post


Link to post
Share on other sites
I'd reccomend Code::Blocks as well. RC2 is kinda old, so you can get the nightly builds here. The ubuntu builds come in .deb format and have the dependacies linked so installing it should be pretty straightforward using sudo dpkg -i cb_somenumber_ubuntu.deb

Share this post


Link to post
Share on other sites
Quote:
Original post by TRYCORP
I use code::blocks currently on windows and love it. With the Ubuntu install will everything be latest versions? Including gdb and everything. I'm not new to gcc or gdb by any means I have just been using them on Windows. I do use Slackware, but not for development. With Ubuntu coming up fast and if I'm not correct it doesn't support KDE defaultly anyway.


In Ubuntu the default is gcc-4.0.3. Now, gcc-4.1.0 was released on 2006-02-28, so you won't be getting the newest, but gcc-4.0.3 works very well.

Edit: It seems I was wrong. gcc-4.0.3 was released on March 10, 2006, and is actually newer than 4.1.0 [wink]

Quote:

Also, 512 MB of ram into the operating system is what Microsoft has published as recommended. XP Pro only needs 64 and suggests 128. I have an idea! How about Microsoft make a fast OS instead of a hold my hand whilst I send my e-mail OS. Yeah, yeah, yeah, you can get different flavors, including thier "Starter" (AKA CRIPPLED!), but I don't want "newb 'I <3 AIM' edition", "business edition", "HOME business edition", "Dead End Job Edition", "Do your taxes at home edition", or the almight "ULTIMATE EDITION!!" /** Insert Angelic Choir Here */ which I'm sure is where they crammed every useless feature they had into one big 2 DVD install in order to create a 200 page feature manual or something.


Couldn't just keep Windows XP Pro? ...

Quote:
Original post by BBB
jEdit (IMO 10 times better then KDevelop and Anjuta) Scons (better then GNU Make) Subversion ("Subversion is CVS done right")


Never tried jEdit. Scons is beautiful. For a versioning system, be sure to check out Bazaar.

Quote:

About OpenGL: all the headers and libs you need should come with the nVidia-drivers (atleast it has worked for me). Don't know about ATI.


You're right, I forgot. For ati, install the xorg-driver-fglrx-dev package.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
https://support.ati.com/ics/support/default.asp?deptID=894&task=knowledge&folderID=27

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by BBB
jEdit (IMO 10 times better then KDevelop and Anjuta) Scons (better then GNU Make) Subversion ("Subversion is CVS done right")


I agree with all of that, except for the fact that the superior editor is obviously XEmacs.

Share this post


Link to post
Share on other sites
Sign in to follow this