<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>What is the error in following little program</title>
		<link>http://www.allegro.cc/forums/view/616710</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sat, 04 Feb 2017 05:33:45 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I started programming in C.<br />I started programming with allegro.<br />Following Programm:<br />#include &lt;allegro.h&gt;</p><p>int main(){<br />   allegro_init();<br />   install_keyboard();<br />   set_color_depth(16);<br />   set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0);<br />   ALLEGRO_BITMAP *screen;</p><p>   putpixel(screen, 10, 30, makecol(255, 255, 255));//macht einen Punkt<br />   vline(screen, 30, 80, 300, makecol(0, 255, 0));//senkrechte Linie<br />   hline(screen, 40, 20, 400, makecol(0, 0, 255));//waagrechte Linie<br />   line(screen, 0, 0, 640, 480, makecol(255, 0, 0)); //Linie<br />   triangle(screen, 0, 400, 0, 450, 100, 450, makecol(255, 0, 255));//gefülltes Dreieck<br />   rect(screen, 100, 200, 200, 250, makecol(255, 255, 0));//leeres Viereck<br />   rectfill(screen, 125, 210, 175, 240, makecol(255, 255, 0));//gefülltes Viereck<br />   circle(screen, 500, 400, 50, makecol(255, 0, 0)); //leerer Kreis<br />   circlefill(screen, 500, 400, 25, makecol(255, 255, 255));//gefüllter Kreis</p><p>   readkey();<br />   return 0;<br />}</p><p>I got the error from Gcc compiler:<br />johannes@linux-myvz:~/programme-c&gt; gcc zeichnen.c -o zeichnen -I /usr/local/include/allegro5<br />zeichnen.c: In function ‘main’:<br />zeichnen.c:7:17: error: ‘GFX_AUTODETECT’ undeclared (first use in this function)<br />    set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0);<br />                 ^<br />zeichnen.c:7:17: note: each undeclared identifier is reported only once for each function it appears in</p><p>What is wrong?<br />Sincerely Johannes Fangmeyer
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (toussaint1963)</author>
		<pubDate>Fri, 27 Jan 2017 23:30:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Your code is written using Allegro 4. You just installed Allegro 5. They are not compatible. I suggest using the tutorials for Allegro 5 on the wiki to get yourself started using Allegro 5. </p><p>See these for more details :</p><p><a href="https://wiki.allegro.cc/index.php?title=Getting_Started#Official_Getting_Started_Guide">https://wiki.allegro.cc/index.php?title=Getting_Started#Official_Getting_Started_Guide</a></p><p><a href="https://wiki.allegro.cc/index.php?title=Getting_Started#Tutorials">https://wiki.allegro.cc/index.php?title=Getting_Started#Tutorials</a></p><p>EDIT<br />Even if you were using Allegro 4, your program still has errors. Don&#39;t declare &#39;screen&#39; - allegro 4 defines it for you, and if you declare one of your own, it will shadow the global screen variable. It&#39;s also undefined because you didn&#39;t initialize it, so it would crash if you tried to draw to it.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Fri, 27 Jan 2017 23:48:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The term:<br />set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0);<br />is allegro5, why the error message?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (toussaint1963)</author>
		<pubDate>Sat, 28 Jan 2017 02:53:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>That&#39;s allegro 4 code.</p><p>In allegro 5, you would call <span class="source-code"><a href="http://www.allegro.cc/manual/al_create_display"><span class="a">al_create_display</span></a><span class="k2">(</span>width,height<span class="k2">)</span><span class="k2">;</span></span>.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Sat, 28 Jan 2017 04:47:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I changed the program in allegro5:<br />#include &lt;allegro.h&gt;<br />#include &lt;allegro5.h&gt;<br />#include &lt;allegro_primitives.h&gt;<br />#include &lt;allegro5/allegro_color.h&gt;<br />#include &lt;base.h&gt;</p><p>int main(){<br />  <br />   int w=640;<br />   int h=480;<br />   const char *white=&quot;white&quot;;<br />   const char *red=&quot;red&quot;;<br />   al_init();<br />   al_install_keyboard();<br />   set_color_depth(16);<br />   al_create_display(w,h);<br />   al_color_name(*white);<br />   al_color_name(*red);<br />     </p><p>   <br />   <br />   al_draw_line(0, 0, 640, 480, white,1); //Linie<br />   al_draw_triangle( 0, 400, 0, 450, 100, 450, white,1);//gefülltes Dreieck<br />   al_draw_rectangle(100, 200, 200, 250,white,1);//leeres Viereck<br />   al_draw_filled_rectangle( 125, 210, 175, 240, red);//gefülltes Viereck<br />   al_draw_circle( 500, 400, 50,white,1); //leerer Kreis<br />   al_draw_filled_circle(500, 400, 25,white);//gefüllter Kreis</p><p>   readkey();<br />   return 0;<br />}<br />I got error messages with gcc. What ist wrong?<br />Sincerely Johannes Fangmeyer
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (toussaint1963)</author>
		<pubDate>Sat, 28 Jan 2017 23:37:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>On the forums, please use &lt;code&gt;code goes here...&lt;/code&gt; tags to post code. It makes it much easier to read and look at.</p><p>The highlighted lines (***) are incorrect :
</p><div class="quote_container"><div class="title">toussaint1963 said:</div><div class="quote"><p>
</p><div class="source-code snippet"><div class="inner"><pre> <span class="c">// Allegro 4 header</span>
<span class="p">#include &lt;allegro.h&gt; ***</span>

<span class="c">// incorrect allegro 5 include</span>
<span class="p">#include &lt;allegro5.h&gt; ***</span>

<span class="c">// incorrect allegro 5 include</span>
<span class="p">#include &lt;allegro_primitives.h&gt; ***</span>

<span class="c">// correct</span>
<span class="p">#include &lt;allegro5/allegro_color.h&gt;</span>

<span class="c">// What is this for?</span>
<span class="p">#include &lt;base.h&gt; ***</span>
</pre></div></div><p>
</p></div></div><p>
Since all allegro 5 headers live in the allegro5 include directory, you need to preface every allegro 5 header include with allegro5/ like so :
</p><div class="source-code snippet"><div class="inner"><pre><span class="p">#include "allegro5/allegro.h"</span>
<span class="p">#include "allegro5/allegro_primitives.h"</span>
<span class="p">#include "allegro5/allegro_color.h"</span>
</pre></div></div><p>
Note that I used &quot;&quot; and not &lt;&gt;. That means they are user headers, and not system headers. If you use &lt;&gt; it will only search system header directories and not user specified ones.</p><p>Also, you&#39;re using <span class="source-code"><a href="http://www.allegro.cc/manual/al_color_name"><span class="a">al_color_name</span></a></span> incorrectly. If you look at the documentation, you&#39;ll see that <span class="source-code"><a href="http://www.allegro.cc/manual/al_color_name"><span class="a">al_color_name</span></a></span> returns an <span class="source-code"><a href="http://www.allegro.cc/manual/ALLEGRO_COLOR"><span class="a">ALLEGRO_COLOR</span></a></span> object. You pass that to your drawing functions, like so :
</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/al_draw_line"><span class="a">al_draw_line</span></a><span class="k2">(</span><span class="n">0</span> , <span class="n">0</span> , <span class="n">640</span> , <span class="n">480</span> , <a href="http://www.allegro.cc/manual/al_color_name"><span class="a">al_color_name</span></a><span class="k2">(</span><span class="s">"white"</span><span class="k2">)</span> , <span class="n">1</span><span class="k2">)</span><span class="k2">;</span> <span class="c">//Linie</span>
</pre></div></div><p>

See <span class="source-code"><a href="http://www.allegro.cc/manual/al_color_name_to_rgb"><span class="a">al_color_name_to_rgb</span></a></span> for details on which color names you can specify.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
</p><div class="source-code snippet"><div class="inner"><pre><div class="highlight"><a href="http://www.allegro.cc/manual/set_color_depth"><span class="a">set_color_depth</span></a><span class="k2">(</span><span class="n">16</span><span class="k2">)</span><span class="k2">;</span></div>

<div class="highlight"><a href="http://www.allegro.cc/manual/readkey"><span class="a">readkey</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span> </div>
</pre></div></div><p>
</p></div></div><p>
set_color_depth(int) and readkey() are allegro 4 functions. You generally don&#39;t need to change the color depth. Just let allegro 5 set it for you. It will usually use 32 or 24 bit color depending on the desktop color depth.</p><p>The equivalent code for readkey() in allegro 5 would be : 
</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/ALLEGRO_EVENT_QUEUE"><span class="a">ALLEGRO_EVENT_QUEUE</span></a><span class="k3">*</span> queue <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_create_event_queue"><span class="a">al_create_event_queue</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<a href="http://www.allegro.cc/manual/al_register_event_source"><span class="a">al_register_event_source</span></a><span class="k2">(</span>queue , <a href="http://www.allegro.cc/manual/al_get_keyboard_event_source"><span class="a">al_get_keyboard_event_source</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>

<span class="k1">do</span> <span class="k2">{</span>
   <a href="http://www.allegro.cc/manual/ALLEGRO_EVENT"><span class="a">ALLEGRO_EVENT</span></a> ev<span class="k2">;</span>
   <a href="http://www.allegro.cc/manual/al_wait_for_event"><span class="a">al_wait_for_event</span></a><span class="k2">(</span>queue , <span class="k3">&amp;</span>ev<span class="k2">)</span><span class="k2">;</span>
<span class="k2">}</span> <span class="k1">while</span> <span class="k2">(</span>ev.type <span class="k3">!</span><span class="k3">=</span> ALLEGRO_EVENT_KEY_DOWN<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

Try and stop mixing allegro 4 and 5 functions together. They are not compatible. The manual for Allegro 5 is here :</p><p><a href="http://liballeg.org/a5docs/trunk/">Allegro 5 online manual</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Sun, 29 Jan 2017 00:54:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I got the error:<br />zeichnen.c: In function ‘main’:<br />zeichnen.c:31:10: error: ‘ev’ undeclared (first use in this function)<br /> } while (ev.type != ALLEGRO_EVENT_KEY_DOWN);<br />          ^<br />zeichnen.c:31:10: note: each undeclared identifier is reported only once for each function it appears in</p><p>I don&#39;t know, what the programming means.<br />Sincerely Johannes Fangmeyer
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (toussaint1963)</author>
		<pubDate>Sun, 29 Jan 2017 04:46:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Oh, sorry.</p><p>That should have been this :
</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/ALLEGRO_EVENT_QUEUE"><span class="a">ALLEGRO_EVENT_QUEUE</span></a><span class="k3">*</span> queue <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_create_event_queue"><span class="a">al_create_event_queue</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<a href="http://www.allegro.cc/manual/al_register_event_source"><span class="a">al_register_event_source</span></a><span class="k2">(</span>queue , <a href="http://www.allegro.cc/manual/al_get_keyboard_event_source"><span class="a">al_get_keyboard_event_source</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>

<a href="http://www.allegro.cc/manual/ALLEGRO_EVENT"><span class="a">ALLEGRO_EVENT</span></a> ev<span class="k2">;</span>
<span class="k1">do</span> <span class="k2">{</span>
   <a href="http://www.allegro.cc/manual/al_wait_for_event"><span class="a">al_wait_for_event</span></a><span class="k2">(</span>queue , <span class="k3">&amp;</span>ev<span class="k2">)</span><span class="k2">;</span>
<span class="k2">}</span> <span class="k1">while</span> <span class="k2">(</span>ev.type <span class="k3">!</span><span class="k3">=</span> ALLEGRO_EVENT_KEY_DOWN<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Sun, 29 Jan 2017 04:49:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I got following error messages:<br />/tmp/ccjg5tJd.o: In function `main&#39;:<br />zeichnen.c:(.text+0x22): undefined reference to `al_install_system&#39;<br />zeichnen.c:(.text+0x27): undefined reference to `al_install_keyboard&#39;<br />zeichnen.c:(.text+0x36): undefined reference to `al_create_display&#39;<br />zeichnen.c:(.text+0x40): undefined reference to `al_color_name&#39;<br />zeichnen.c:(.text+0x93): undefined reference to `al_draw_line&#39;<br />zeichnen.c:(.text+0x9d): undefined reference to `al_color_name&#39;<br />zeichnen.c:(.text+0xfe): undefined reference to `al_draw_triangle&#39;<br />zeichnen.c:(.text+0x108): undefined reference to `al_color_name&#39;<br />zeichnen.c:(.text+0x165): undefined reference to `al_draw_rectangle&#39;<br />zeichnen.c:(.text+0x16f): undefined reference to `al_color_name&#39;<br />zeichnen.c:(.text+0x1c4): undefined reference to `al_draw_filled_rectangle&#39;<br />zeichnen.c:(.text+0x1ce): undefined reference to `al_color_name&#39;<br />zeichnen.c:(.text+0x223): undefined reference to `al_draw_circle&#39;<br />zeichnen.c:(.text+0x22d): undefined reference to `al_color_name&#39;<br />zeichnen.c:(.text+0x27a): undefined reference to `al_draw_filled_circle&#39;<br />zeichnen.c:(.text+0x27f): undefined reference to `al_create_event_queue&#39;<br />zeichnen.c:(.text+0x288): undefined reference to `al_get_keyboard_event_source&#39;<br />zeichnen.c:(.text+0x29a): undefined reference to `al_register_event_source&#39;<br />zeichnen.c:(.text+0x2ad): undefined reference to `al_wait_for_event&#39;<br />collect2: error: ld returned 1 exit status</p><p>What is wrong?<br />Sincerely Johannes fangmeyer
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (toussaint1963)</author>
		<pubDate>Mon, 30 Jan 2017 01:43:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You have to link to allegro using pkg-config or else directly to the allegro libraries.</p><p>-lallegro_main -lallegro_primitives -l...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Mon, 30 Jan 2017 01:50:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Haw have I to use pkg-config.<br />Allegro.h is in the directory /usr/local/include/allegro5.<br />Sincerely Johannes Fangmeyer
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (toussaint1963)</author>
		<pubDate>Mon, 30 Jan 2017 05:25:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You have to set the include search directory with -I and then specify your source files and after that you have to link using pkg-config. Note the backticks around the pkg-config call. 
</p><div class="source-code snippet"><div class="inner"><pre>gcc <span class="k3">-</span>Wall <span class="k3">-</span>g <span class="k3">-</span>o main.exe <span class="k3">-</span>I usr<span class="k3">/</span>local<span class="k3">/</span>include main.c `pkg-config <span class="k3">-</span><span class="k3">-</span>libs allegro-5.0 allegro-primitives-5.0`
</pre></div></div><p>

Run this command to see the different libraries for allegro :<br />pkg-config --list-all | grep allegro
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Mon, 30 Jan 2017 06:01:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I got following error message:<br />johannes@linux-myvz:~/programme-c&gt; gcc -Wall -g -o zeichnen -I usr/local/include zeichnen.c `pkg-config --libs allegro-5.0 allegro-primitives-5.0` -I /usr/local/include/allegro5<br />Package allegro-5.0 was not found in the pkg-config search path.<br />Perhaps you should add the directory containing `allegro-5.0.pc&#39;<br />to the PKG_CONFIG_PATH environment variable<br />No package &#39;allegro-5.0&#39; found<br />Package allegro-primitives-5.0 was not found in the pkg-config search path.<br />Perhaps you should add the directory containing `allegro-primitives-5.0.pc&#39;<br />to the PKG_CONFIG_PATH environment variable<br />No package &#39;allegro-primitives-5.0&#39; found<br />and then the former listed errors<br />MfG Johannes Fangmeyer
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (toussaint1963)</author>
		<pubDate>Tue, 31 Jan 2017 02:11:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/616710/1028111#target">toussaint1963</a> said:</div><div class="quote"><p>
Perhaps you should add the directory containing `allegro-5.0.pc&#39;<br />to the PKG_CONFIG_PATH environment variable<br />No package &#39;allegro-5.0&#39; found
</p></div></div><p>
This indicates pkg-config doesn&#39;t know where to find the allegro-5.0.pc file. CMake may not have detected pkg-config properly when you installed allegro 5. Was pkg-config installed before you compiled Allegro?</p><p>Did you try this?
</p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/616710/1028100#target">Edgar Reynaldo</a> said:</div><div class="quote"><p>
pkg-config --list-all | grep allegro 
</p></div></div><p>
It will tell you all the .pc files that contain allegro in their name.</p><p>You may need to re-run cmake after deleting CMakeCache.txt to properly detect pkg-config.</p><p>Otherwise, you need to find the directory containing allegro-5.0.pc and then add that directory to the PKG_CONFIG_PATH environment variable. Someone else will have to tell you how to do that.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Tue, 31 Jan 2017 02:26:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>How can I set allegro-5.pc to the PKG_CONFIG_PATH? allegro-5.pc ist in the /bin/allegro-5.2.2.0/build/lib/pkgconfig directory.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (toussaint1963)</author>
		<pubDate>Wed, 01 Feb 2017 02:49:23 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><pre>
export OLD_PKG_CONFIG_PATH=$PKG_CONFIG_PATH

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/bin/allegro-5.2.2.0/build/lib/pkgconfig
</pre><p>

However, you may have installed allegro incorrectly, as that should have already been done I think...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Wed, 01 Feb 2017 07:02:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>That&#39;s a rather strange path... This looks more like the source tree than the installation path to me... Perhaps he didn&#39;t install... The usual incantation is something like:</p><pre class="terminal">git clone https://domain/path/to/repo ~/src/allegro5
cd ~/src/allegro5
mkdir build
cd build
cmake ..
make
sudo make install</pre><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (bamccaig)</author>
		<pubDate>Wed, 01 Feb 2017 07:37:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I said it false <br />the directory was /home/johannes/bin/allegro-5.2.2.0/build/lib/pkgconfig<br />Sorry for this mistake .<br />there was only a file allegro_primitives-5.pc not allegro-primitives.pc<br />Sincerely Johannes Fangmeyer
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (toussaint1963)</author>
		<pubDate>Thu, 02 Feb 2017 03:22:55 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Is that the directory you built allegro in? You need to &#39;make install&#39; allegro and then pkg-config should be able to find its entries for allegro. To do that, you have to have pkg-config installed before you run cmake. You may need to rebuild allegro and rerun cmake after deleting CMakeCache.txt.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Fri, 03 Feb 2017 01:46:17 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I habe installed pkg-config zhen made cmake .., make and make install and it runs.<br />There was shown a new display, but there was no line, triangle, rectangle and circle drawn. what is wrong?<br />Here the code of the program:
</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">  1</span><span class="p">#include "allegro5/allegro.h"</span>
<span class="number">  2</span><span class="p">#include "allegro5/allegro_primitives.h"</span>
<span class="number">  3</span><span class="p">#include "allegro5/allegro_color.h"</span>
<span class="number">  4</span>
<span class="number">  5</span>
<span class="number">  6</span><span class="k1">int</span> main<span class="k2">(</span><span class="k2">)</span><span class="k2">{</span>
<span class="number">  7</span>  
<span class="number">  8</span>   <span class="k1">int</span> w<span class="k3">=</span><span class="n">640</span><span class="k2">;</span>
<span class="number">  9</span>   <span class="k1">int</span> h<span class="k3">=</span><span class="n">480</span><span class="k2">;</span>
<span class="number"> 10</span>   <a href="http://www.allegro.cc/manual/al_init"><span class="a">al_init</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 11</span>   <a href="http://www.allegro.cc/manual/al_install_keyboard"><span class="a">al_install_keyboard</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 12</span>   <a href="http://www.allegro.cc/manual/al_create_display"><span class="a">al_create_display</span></a><span class="k2">(</span>w,h<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 13</span>   
<span class="number"> 14</span>     
<span class="number"> 15</span>
<span class="number"> 16</span>   
<span class="number"> 17</span>   
<span class="number"> 18</span>   <a href="http://www.allegro.cc/manual/al_draw_line"><span class="a">al_draw_line</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">640</span>, <span class="n">480</span>, <a href="http://www.allegro.cc/manual/al_color_name"><span class="a">al_color_name</span></a><span class="k2">(</span><span class="s">"white"</span><span class="k2">)</span>,<span class="n">2</span><span class="k2">)</span><span class="k2">;</span> <span class="c">//Linie</span>
<span class="number"> 19</span>   <a href="http://www.allegro.cc/manual/al_draw_triangle"><span class="a">al_draw_triangle</span></a><span class="k2">(</span> <span class="n">0</span>, <span class="n">400</span>, <span class="n">0</span>, <span class="n">450</span>, <span class="n">100</span>, <span class="n">450</span>, <a href="http://www.allegro.cc/manual/al_color_name"><span class="a">al_color_name</span></a><span class="k2">(</span><span class="s">"white"</span><span class="k2">)</span>,<span class="n">2</span><span class="k2">)</span><span class="k2">;</span><span class="c">//gefülltes Dreieck</span>
<span class="number"> 20</span>   <a href="http://www.allegro.cc/manual/al_draw_rectangle"><span class="a">al_draw_rectangle</span></a><span class="k2">(</span><span class="n">100</span>, <span class="n">200</span>, <span class="n">200</span>, <span class="n">250</span>,<a href="http://www.allegro.cc/manual/al_color_name"><span class="a">al_color_name</span></a><span class="k2">(</span><span class="s">"white"</span><span class="k2">)</span>,<span class="n">2</span><span class="k2">)</span><span class="k2">;</span><span class="c">//leeres Viereck</span>
<span class="number"> 21</span>   <a href="http://www.allegro.cc/manual/al_draw_filled_rectangle"><span class="a">al_draw_filled_rectangle</span></a><span class="k2">(</span> <span class="n">125</span>, <span class="n">210</span>, <span class="n">175</span>, <span class="n">240</span>, <a href="http://www.allegro.cc/manual/al_color_name"><span class="a">al_color_name</span></a><span class="k2">(</span><span class="s">"red"</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span><span class="c">//gefülltes Viereck</span>
<span class="number"> 22</span>   <a href="http://www.allegro.cc/manual/al_draw_circle"><span class="a">al_draw_circle</span></a><span class="k2">(</span> <span class="n">500</span>, <span class="n">400</span>, <span class="n">50</span>,<a href="http://www.allegro.cc/manual/al_color_name"><span class="a">al_color_name</span></a><span class="k2">(</span><span class="s">"white"</span><span class="k2">)</span>,<span class="n">2</span><span class="k2">)</span><span class="k2">;</span> <span class="c">//leerer Kreis</span>
<span class="number"> 23</span>   <a href="http://www.allegro.cc/manual/al_draw_filled_circle"><span class="a">al_draw_filled_circle</span></a><span class="k2">(</span><span class="n">500</span>, <span class="n">400</span>, <span class="n">25</span>,<a href="http://www.allegro.cc/manual/al_color_name"><span class="a">al_color_name</span></a><span class="k2">(</span><span class="s">"white"</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span><span class="c">//gefüllter Kreis</span>
<span class="number"> 24</span>
<span class="number"> 25</span> <a href="http://www.allegro.cc/manual/ALLEGRO_EVENT_QUEUE"><span class="a">ALLEGRO_EVENT_QUEUE</span></a><span class="k3">*</span> queue <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_create_event_queue"><span class="a">al_create_event_queue</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 26</span><a href="http://www.allegro.cc/manual/al_register_event_source"><span class="a">al_register_event_source</span></a><span class="k2">(</span>queue , <a href="http://www.allegro.cc/manual/al_get_keyboard_event_source"><span class="a">al_get_keyboard_event_source</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 27</span>
<span class="number"> 28</span><a href="http://www.allegro.cc/manual/ALLEGRO_EVENT"><span class="a">ALLEGRO_EVENT</span></a> ev<span class="k2">;</span>
<span class="number"> 29</span><span class="k1">do</span> <span class="k2">{</span>
<span class="number"> 30</span>   <a href="http://www.allegro.cc/manual/al_wait_for_event"><span class="a">al_wait_for_event</span></a><span class="k2">(</span>queue , <span class="k3">&amp;</span>ev<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 31</span><span class="k2">}</span> <span class="k1">while</span> <span class="k2">(</span>ev.type <span class="k3">!</span><span class="k3">=</span> ALLEGRO_EVENT_KEY_DOWN<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 32</span>
<span class="number"> 33</span>   <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 34</span><span class="k2">}</span>
</div></div><p>
Sincerely Johannes Fangmeyer
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (toussaint1963)</author>
		<pubDate>Fri, 03 Feb 2017 03:55:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Allegro 5&#39;s output is buffered. You have to call <span class="source-code"><a href="http://www.allegro.cc/manual/al_flip_display"><span class="a">al_flip_display</span></a></span> to show what you&#39;ve drawn since the last call to al_flip_display.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Fri, 03 Feb 2017 04:34:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thank You. Now it runs!<br />Thank You very much<br />Sincerely Johannes Fangmeyer
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (toussaint1963)</author>
		<pubDate>Sat, 04 Feb 2017 01:26:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The cookies are a lie. <img src="http://www.allegro.cc/forums/smileys/cry.gif" alt=":&#39;(" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (bamccaig)</author>
		<pubDate>Sat, 04 Feb 2017 05:33:45 +0000</pubDate>
	</item>
</rss>
