|
|
| How to install allegro in ubuntu |
|
deepak_gtm63
Member #10,664
February 2009
|
I use allegro in Win Xp.Now, I want to use in Ubuntu Linux.But I couldn't find any idea about to install it in linux.Plese give me a specific and exact answer if you know....!! |
|
Timorg
Member #2,028
March 2002
|
Your probably want to go... sudo aptitude install liballegro4.2-dev that only installs the stuff you need to develop programs, it doesn't have the debugging library. Or you could just install it from source. ____________________________________________________________________________________________ |
|
deepak_gtm63
Member #10,664
February 2009
|
I did what u have said but what to do to configure it. |
|
Milan Mimica
Member #3,877
September 2003
|
What's there to configure?
-- |
|
deepak_gtm63
Member #10,664
February 2009
|
I mean to say that..After allegro installed by above mentioned,How to coonfigure linker settings or other setting,what are needed to run a allegro program. |
|
amber
Member #6,783
January 2006
|
Assuming it's installed properly (and aptitude should take care of all that for you) you just need to #include <allegro.h> in your programs and link with -lalleg and it'll work fine. |
|
Thomas Fjellstrom
Member #476
June 2000
|
amber said: and link with -lalleg and it'll work fine. Not quite. On linux you need to use `allegro-config --libs` instead of -lalleg -- |
|
Timorg
Member #2,028
March 2002
|
Adding `allegro-config --cflags` or `allegro-config --cppflags` to the compiler flags wouldn't hurt either. ____________________________________________________________________________________________ |
|
deepak_gtm63
Member #10,664
February 2009
|
I mean to say that where to add "allegro-config --libs",Write in Detail..I couldn't understand it. |
|
Timorg
Member #2,028
March 2002
|
Well that really does depend on the IDE (if any) that you are using, but in Code::Blocks... {"name":"598110","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/c\/6c297a816a203d05c5bcdb8444ac5c5b.png","w":664,"h":504,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/c\/6c297a816a203d05c5bcdb8444ac5c5b"} If you are using a C project it should be `allegro-config --cflags` on the Compiler settings->Other options tab. ____________________________________________________________________________________________ |
|
Martin KalbfuĆ
Member #9,131
October 2007
|
on the console do: gcc game.c -o game `allegro-config --shared` or for a C++ project replace gcc with g++ that's all. http://remote-lisp.spdns.de -- my server side lisp interpreter |
|
Timorg
Member #2,028
March 2002
|
The `allegro-config --cppflags` is probably only needed when you have installed allegro to a non standard place. If you don't have root access to the machine or for whatever other reason. ____________________________________________________________________________________________ |
|
deepak_gtm63
Member #10,664
February 2009
|
I have done what you have said,and allegro_init(); readkey(); return 0; } and following error occured :- -------------- Build: Debug in aaa --------------- Compiling: main.cpp |
|
Timorg
Member #2,028
March 2002
|
I will attach a project that is all setup to see if that works. (Attached is a simple hello world project. Also, if you use the <code>put code here</code> tags, your code will be nicely formated and easy to read. ____________________________________________________________________________________________ |
|
deepak_gtm63
Member #10,664
February 2009
|
I think,my error is due to wrong choose of the applicaton type,i.e.,while clicking on creat a new project i have choosen console application,probably it is wrong.Which one is correct. |
|
Timorg
Member #2,028
March 2002
|
I have always used "Console application" under linux, which is what the attached project was. ____________________________________________________________________________________________ |
|
deepak_gtm63
Member #10,664
February 2009
|
Same souce code if i paste on the project u have given,it runs.But in case of project i have created choosing console application doesn't works.It gives the errors like |
|
Timorg
Member #2,028
March 2002
|
In a project go... Project -> Build Options... -> <Project Name> -> Enable all compiler warnings (Overrides every other setting) [-Wall] Where project name is top left, with release and/or Debug below it. When you turn that option on go The post the contents of build log here. I hope that all made some sense (I am drunk, ____________________________________________________________________________________________ |
|
deepak_gtm63
Member #10,664
February 2009
|
that gives the same error like before. |
|
|