<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>how to install install Allegro 5 with codelite on xubuntu ?</title>
		<link>http://www.allegro.cc/forums/view/618369</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sun, 21 Feb 2021 19:31:05 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hi, I watched this video <a href="https://www.youtube.com/watch?v=3t19oia8F-o">https://www.youtube.com/watch?v=3t19oia8F-o</a> and the program below is working fine.</p><p>//***********************************<br />//*** Programme de test Allegro 5 ***<br />//*********************************** </p><p>#include &lt;stdlib.h&gt;<br />#include &lt;time.h&gt;<br />#include &lt;allegro5/allegro.h&gt;<br />#include &lt;allegro5/allegro_native_dialog.h&gt;<br />#include &lt;allegro5/allegro_primitives.h&gt;<br />#include &lt;allegro5/allegro_font.h&gt;<br />#include &lt;allegro5/allegro_ttf.h&gt;</p><p>//***  Inclusion des fonctions ***<br />//#include &lt;fonctions.h&gt;</p><p>//*********************<br />//*** Fonction main ***<br />//*********************</p><p>int main()<br />{<br />  // initialisation Allegro 5, quite si echou<br />  if(!al_init()) return -1;    <br />    <br />  // pour obtenir une fenêtre<br />  ALLEGRO_DISPLAY *display=NULL;<br />  <br />  ALLEGRO_KEYBOARD_STATE key; // clavier simple  <br />  <br />  int fin=0; // pour la boucle de jeu<br />  unsigned char r,v,b; // rouge vert bleu (0 - 255)<br />  <br />  srand(time(NULL)); // initialisation azar<br />  <br />  // creation de la fenetre <br />  display=al_create_display(640,480);<br />    <br />  // quite si le display a echoue<br />  if(!display) return -1;<br />    <br />  // install le clavier<br />  if(!al_install_keyboard()) return -1; <br />  <br />  // install la souris<br />  if(!al_install_mouse()) return -1;</p><p>  // install le joystick<br />  if(!al_install_joystick()) return -1;    </p><p>  //if(!al_init_font_addon()) return -1; // init pour le text font<br />  //if(!al_init_ttf_addon()) return -1; // init pour le text ttf<br />  //if(!al_init_primitives_addon()) return -1; // init pour les primitives graphiques<br />  <br />  //ALLEGRO_FONT *font24 = al_load_font(&quot;Starjhol.ttf&quot;,24,0);</p><p>  // donner un nom à sa fenetre<br />  al_set_window_title( display, &quot;Premier programme avec CodeLite &amp; Allegro5&quot;);</p><p>  // colorer la fenetre<br />  al_clear_to_color(al_map_rgb(255,0,100));<br />    <br />  while(!fin)<br />  {<br />    al_get_keyboard_state(&amp;key); // recuperation etat du clavier <br />  <br />    if(al_key_down(&amp;key,ALLEGRO_KEY_ESCAPE)) fin=1; // fin de boucle si touche echap down<br />    <br />    // changement de couleur du fond si touche entree down<br />    if(al_key_down(&amp;key,ALLEGRO_KEY_ENTER))<br />    {<br />      r=rand()%256;<br />      v=rand()%256;<br />      b=rand()%256; <br />      al_clear_to_color(al_map_rgb(r,v,b));<br />    }<br />    <br />    // affiche le display<br />    al_flip_display();<br />  } </p><p>  // colorer la fenetre<br />  al_clear_to_color(al_map_rgb(0,0,255));<br />   <br />  // affiche le display<br />  al_flip_display();<br />    <br />  // temps d&#39;attente en secondes<br />  al_rest(5.0);</p><p>  // liberation memoire de la fenetre<br />  al_destroy_display(display);<br />    <br />  // tout desinstaller<br />  al_uninstall_system();</p><p>  return 0;<br />}</p><p>But except for this:</p><p>  if(!al_init_font_addon()) return -1;<br />  if(!al_init_ttf_addon()) return -1;<br />  if(!al_init_primitives_addon()) return -1; </p><p>So with this three lines I have several errors like :<br />&quot;undefined reference to `al_init_font_addon&#39;&quot;,<br />&quot;undefined reference to `al_init_ttf_addon&#39;&quot;<br />&quot;undefined reference to `al_init_primitives_addon&#39;&quot;</p><p>I am not a professional programmer, only a beginner hobbyist.<br />Do you have a solution ?</p><p>Thanks
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (dolphin swimming)</author>
		<pubDate>Sat, 20 Feb 2021 04:25:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You can either link the massive monolith library that includes everything. Or link to the individual libraries for each addon. Look at the libraries folder/directory for the names.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (DanielH)</author>
		<pubDate>Sat, 20 Feb 2021 05:59:48 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hi,</p><p>Thanks, but I don&#39;t have a file named &quot;monolith&quot; in my DD.</p><p>Do you have an example for proceed for this ?</p><p>&quot;link to the individual libraries for each addon. Look at the libraries folder/directory for the names.&quot;
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (dolphin swimming)</author>
		<pubDate>Sat, 20 Feb 2021 18:37:51 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The libraries you need to link will be named something like :</p><pre>
liballegro_*.so
</pre><p>

Look in your /usr/lib or /usr/local/lib directory for the allegro libraries you need to link.</p><p>The monolith library doesn&#39;t come in the repositories on Linux AFAIK.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Sun, 21 Feb 2021 04:13:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hi thanks.</p><p>Yes I have several &quot;liballegro_*.so&quot; on /usr/lib/x86_64-linux-gnu</p><p>For installing Allegro 5 I proceeded like this:</p><p>sudo add-apt-repository ppa:allegro/5.2<br />sudo apt update<br />sudo apt upgrade</p><p>sudo apt install liballegro5-dev</p><p>In CodeLite:</p><p>New Project -&gt; Console -&gt; Simple executable (gcc)<br />Then in Settings Projet &quot;allegrotest&quot; (name) <br /> <br />Compiler -&gt; Include Paths -&gt; /usr/include<br />Linker -&gt; Libraries Search Path -&gt; /usr/lib <br />Linker -&gt; Libraries -&gt; allegro</p><p>and now:</p><p>Linker -&gt; Libraries Search Path -&gt; /usr/lib<br />Linker -&gt; Libraries Search Path -&gt; /usr/lib/x86_64-linux-gnu</p><p>But I have the same errors.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (dolphin swimming)</author>
		<pubDate>Sun, 21 Feb 2021 06:07:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>There is more than one allegro library to link, because allegro comes with a series of addons.</p><p>In your linker libraries tab, add liballegro_font.so, liballegro_ttf.so, and liballegro_primitives.so, in addition to any other addon libraries you are using. You&#39;ll know which ones because you had to include their header to use them.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Sun, 21 Feb 2021 06:31:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>YES very good answers thanks very much. Now I have &quot;====0 errors, 0 warnings====&quot; in CodeLite. </p><p>Linker -&gt; Libraries -&gt; allegro</p><p>With other libraries like this:</p><p>-&gt; liballegro_font.so<br />-&gt; liballegro_ttf.so<br />-&gt; liballegro_primitives.so</p><p>Thanks a lot Edgar Reynaldo <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (dolphin swimming)</author>
		<pubDate>Sun, 21 Feb 2021 19:31:05 +0000</pubDate>
	</item>
</rss>
