Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOw to INstall Code::Blocks on gentoo linux
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
rhodius
n00b
n00b


Joined: 05 Sep 2005
Posts: 10

PostPosted: Tue Jan 24, 2006 8:38 am    Post subject: HOw to INstall Code::Blocks on gentoo linux Reply with quote

Here: is the HOw to:
http://carcam.f2o.org/article.php3?id_article=213 8)

Here write HOW-TO with solved error:

Now I’m going to talk you about How Install Code::Block 1.0 rc2 on gentoo Linux. There are many tools for programming in many languages, Java, C/C++/C#, python, etc. but Who is the tools for works easy? I have been using kdevelop but it doesn’t like me, because I can’t open new files to add for the current proyect or I don’t know how do it, then I have been look for a new tools and I find it, it’s called Code:Blocks.

Code::Blocks is a free C++ IDE built specifically to meet the most demanding needs of its users. It was designed, right from the start, to be extensible and configurable.

Built around a plugin framework, Code::Blocks can be extended with plugin DLLs. It includes a plugin wizard so you can compile your own plugins! (Free SDK downloaded separately).

Features:

Highlights:

* Open Source! GPL2, no hidden costs.
* Cross-platform. Runs on Linux or Windows (uses wxWidgets).

Compiler-related features:

* Multiple compiler support:
o GCC (MingW / Linux GCC)
o MSVC++
o Digital Mars
o Borland C++ 5.5
o Open Watcom
* Compiles directly or with makefiles
* Predefined project templates
* Imports Dev-C++ projects
* Integrates with GDB for debugging

Interface Features:

* Syntax highlighting, customizable and extensible
* Code folding for C++ and XML files.
* Tabbed interface
* Code completion plugin
* Class Browser
* Smart indent
* One-key swap between .h and .c/.cpp files
* Open files list for quick switching between files (optional)
* External customizable "Tools"
* To-do list management with different users

There is more features here

Now I’m going to install Code::Block continue reading, :)

Install Code::Blocks on gentoo linux

1.Prepare Libraries

Code::Blocks uses the wxWidgets (http://www.wxwindows.org/) library for its GUI. wxWidgets in turn uses GTK+ (http://www.gtk.org/). GTK+ is the library which GNOME desktop uses, but GNOME is not required to use it. In fact, odds are very good that if you have a number of GUI programs installed, you already have it. wxWidgets is also very common, if slightly less so.

You need to compile the wxGTK package with the following use flag:

# +gtk2 +gnome

Note: +gnome is only necesary for people who is using kde.

The best way of getting this done is by adding a line to /etc/portage/package.use and recompiling wxGTK :

# su - ( to become root )
# echo x11-libs/wxGTK gtk2 >> /etc/portage/package.use
# echo x11-libs/wxGTK ~x86 >> /etc/portage/package.keywords
# emerge -a wxGTK

If you don’t have put flag +gtk2 in your USE in /etc/make.conf, then you have to add it:

# USE="gtk2 gnome" emerge -pv wxGTK

Now is displaying that:

[ebuild R ] x11-libs/wxGTK-2.6.2-r1 +X -debug -doc +gnome -joystick -odbc +opengl +sdl -unicode 0 kB

Note: You don’t put unicode flag to recompile that, because there is a bug and you can’t compile it.

2.Get the source code

Option 1: Download a source tarball.

This is easy and means you have an easily-reproduced source set.

1) Download a source tarball from The Download Section of CodeBlocks.org

2) Extract it. For this tutorial, I’m going to assume that you’re installing as root, so /usr/local/src is a good pick. Any location is fine, however. This should create a codeblocks-1.0rc2 ( or similar ) folder.

Option 2: Fetch from CVS

This is not signifigantly harder and means you have a more up-to-date version of the source code. Usually this means more features and different bugs, which might be more or less annoying.

1) Install the CVS client. You might have it already. If not, this just requires the usual :

# emerge dev-util/cvs

2) Set the CVS root. Run the following command, and enter the password anonymous when asked :

# cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/codeblocks login

Note that simply hitting enter—not entering a password—might also work.

3) Checkout a copy. cd to the directory you want the code to be placed in. Note that CVS will create a codeblocks directory for you. For this tutorial, I’m going to assume that you’re installing as root, so /usr/local/src is a good pick. Any location is fine, however.

# cd /usr/local/src

The following command fetches the source from the CVS server :

# cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/codeblocks checkout codeblocks

3.Compile the Code

1) cd to codeblocks directory. Following our example, from CVS this would be /usr/local/src/codeblocks; from a tarball, something like /usr/local/src/codeblocks-1.0rc2 :

# cd /usr/local/src/codeblocks

or

# cd /usr/local/src/codeblocks-1.0rc2

2) bootstrap. The very first time you unpack the source (or checkout from CVS), you need to run ./bootstrap. This will create a sane building environment.

# ./bootstrap

Note: If you get weird errors here try running following command and then bootstrap again.

# find . -type f -and -not -name "*.cpp" -and -not -name "*.h" -and -not -name "*.png" -and -not -name "*.bmp" | sed "s/.*/\"\\0\"/" | xargs dos2unix

Note: If you get weird errors here, is because you don’t have some commands, now install it.

# emerge dos2unix

Now you can running the fllowing command:

# find . -type f -and -not -name "*.cpp" -and -not -name "*.h" -and -not -name "*.png" -and -not -name "*.bmp" | sed "s/.*/\"\\0\"/" | xargs dos2unix

# ./bootstrap

Now i’m going to compiling the code following the next step as root:

# ./configure
# make
# make install

if all is ok, then you can run the program:

# codeblocks

END

Don't forget visit my website, thx ;)
Back to top
View user's profile Send private message
luisfelipe
Guru
Guru


Joined: 09 Apr 2005
Posts: 377

PostPosted: Wed Feb 01, 2006 12:51 pm    Post subject: Reply with quote

I believe there are ebuilds for it on bugzilla.
Back to top
View user's profile Send private message
DanielSwe
n00b
n00b


Joined: 07 Jan 2006
Posts: 3

PostPosted: Sat Feb 04, 2006 11:31 am    Post subject: When? Reply with quote

When will we see a codeblocks ebuild in the gentoo database?
It's such a sweet IDE... =P
Back to top
View user's profile Send private message
luisfelipe
Guru
Guru


Joined: 09 Apr 2005
Posts: 377

PostPosted: Thu Feb 16, 2006 2:34 am    Post subject: Reply with quote

For those that couldn't find it :
https://bugs.gentoo.org/show_bug.cgi?id=89533
Back to top
View user's profile Send private message
Tinyn
n00b
n00b


Joined: 03 Jul 2005
Posts: 34

PostPosted: Thu Feb 16, 2006 4:18 am    Post subject: Reply with quote

The 1.0_rc2 patch in that bug thread fails to apply for me. Oh well.
Back to top
View user's profile Send private message
luisfelipe
Guru
Guru


Joined: 09 Apr 2005
Posts: 377

PostPosted: Thu Feb 16, 2006 5:07 am    Post subject: Reply with quote

I applied it here without problems. There are two patches there : one for the ebuild, and the other that you have
to put inside the files/ directory of dev-util/codeblocks on your overlay.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum