Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » [Linux] Allegro in Geany

This thread is locked; no one can reply to it. rss feed Print
[Linux] Allegro in Geany
abdulmueid
Member #9,762
May 2008

I am currently using Geany Text Editor (http://geany.uvena.de/) as my IDE (really, it can compile) for Allegro and other C++ coding in Linux. I find Geany much faster than Anjuta, Eclipse, MonoDevelop, etc with just the necessary features (Syntax Highlighting, Code Folding, Auto Completion, Symbol Lists, etc).

Here's how to get up and running with Allegro code on Geany:

1. Install Allegro and Geany from your Package Manager or build from source.
2. Run Geany and go to "Build" -> "Set Includes and Arguments" in the toolbar.
3. Use the following settings..

-------------------------------------------------
Compile:

g++ -O0 -g3 -Wall -c -o"%e.o" "%f"

Build:

g++ -o"%e" ./%e.o `allegro-config --libs --static`

Execute:

"./%e"
-------------------------------------------------

Copy the strings as it is, include the quotes.

Happy Compiling :)

SiegeLord
Member #7,827
October 2006
avatar

Quote:

g++ -o"%e" ./%e.o -lalleg -lm -lpthread -lXxf86vm -lXcursor -lXpm -lXext -lX11 -ldl

Why not:
g++ -o"%e" ./%e.o `allegro-config --libs --static` ?

Does that not work with Geany?

Also, this only works on linux, as you well know. And Geany is a cross-platform program, so the windows users who use it would be confused by your guide.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

abdulmueid
Member #9,762
May 2008

Thanks for the tip on Build string. :)
g++ -o"%e" ./%e.o `allegro-config --libs --static` indeed works. I've never thought of that before.

As for the cross-platform, the title says [Linux] first thing. I was just browsing the forums and didn't find anything Geany related so thought i'd make a post.

SiegeLord
Member #7,827
October 2006
avatar

Darn... I fail... :-[

Consider putting this into allegro wiki too.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

count
Member #5,401
January 2005

Whoa! Awesome!
I was looking for something like this for quite a while!

Was tired of using Eclipse and monodevelop and switched back to scite but I really missed an outline.

This rocks! Thank you very much!

abdulmueid
Member #9,762
May 2008

SeigeLord: Great idea, added to wiki :) http://wiki.allegro.cc/Geany

Christopher Bludau: Its a pleasure :)

Go to: