<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Ubuntu 14.04LTS + Code::blocks 13.12</title>
		<link>http://www.allegro.cc/forums/view/615326</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Fri, 01 May 2015 16:36:25 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Update: All is well.  Recompiled allegro5 from source (using wiki guide).  Then linked Allegro files to compiler in C::B and all is well.  Was able to display a basic window.  </p><p>Now begins the learning.</p><p>=========================</p><p>Okay.</p><p>Trying to set Allegro 5.0.1 up on my lap top.</p><p>OS: Ubuntu 14.04LTS<br />IDE: C::B 13.12</p><p>Compilers (apologize for formatting):<br />sean@sean-Satellite-A205:~$ dpkg --list | grep compiler<br />ii  g++                                               4:4.8.2-1ubuntu6                                    i386         GNU C++ compiler<br />ii  g++-4.8                                               4.8.2-19ubuntu1                                     i386         GNU C++ compiler<br />ii  gcc                                                   4:4.8.2-1ubuntu6                                    i386         GNU C compiler<br />ii  gcc-4.8                                               4.8.2-19ubuntu1                                     i386         GNU C compiler<br />ii  hardening-includes                                    2.5ubuntu2.1                                        all          Makefile for enabling compiler flags for security hardening<br />ii  libllvm3.5:i386                                       1:3.5-4ubuntu2~trusty2                              i386         Modular compiler and toolchain technologies, runtime library<br />ii  libxkbcommon0:i386                                    0.4.1-0ubuntu1                                      i386         library interface to the XKB compiler</p><p>Problem:</p><p>I compiled Allegro 5.0.1 properly using CMake (I hope).  I then tried to compile the following code and received error messages:</p><p>===================================================<br />#include &lt;allegro5/allegro.h&gt;<br />#include &lt;allegro5/allegro_native_dialog.h&gt;</p><p>int main(void)<br />{<br />al_show_native_message_box(NULL, &quot;3.8&quot;,&quot;321World!&quot;, &quot;Hello world!&quot;,</p><p>&quot;Whatever|Maybe&quot;, &quot;ALLEGRO_MESSAGEBOX_YES_NO&quot;);</p><p>return -1;</p><p>if(!al_init())<br />     {<br />	al_show_native_message_box(NULL, NULL, NULL, “Error!”, NULL, NULL);<br />	return -1;<br />     }<br />}<br />==================================================</p><p>||=== Build: Debug in alkdsjf (compiler: GNU GCC Compiler) ===|<br />/home/sean/Desktop/Test/alkdsjf/main.c||In function ‘main’:|<br />/home/sean/Desktop/Test/alkdsjf/main.c|11|warning: passing argument 6 of ‘al_show_native_message_box’ makes integer from pointer without a cast [enabled by default]|<br />/usr/local/include/allegro5/allegro_native_dialog.h|51|note: expected ‘int’ but argument is of type ‘char *’|<br />/home/sean/Desktop/Test/alkdsjf/main.c|23|error: stray ‘\342’ in program|<br />/home/sean/Desktop/Test/alkdsjf/main.c|23|error: stray ‘\200’ in program|<br />/home/sean/Desktop/Test/alkdsjf/main.c|23|error: stray ‘\234’ in program|<br />/home/sean/Desktop/Test/alkdsjf/main.c|23|error: ‘Error’ undeclared (first use in this function)|<br />/home/sean/Desktop/Test/alkdsjf/main.c|23|note: each undeclared identifier is reported only once for each function it appears in|<br />/home/sean/Desktop/Test/alkdsjf/main.c|23|error: expected ‘)’ before ‘!’ token|<br />/home/sean/Desktop/Test/alkdsjf/main.c|23|error: stray ‘\342’ in program|<br />/home/sean/Desktop/Test/alkdsjf/main.c|23|error: stray ‘\200’ in program|<br />/home/sean/Desktop/Test/alkdsjf/main.c|23|error: stray ‘\235’ in program|<br />/home/sean/Desktop/Test/alkdsjf/main.c|23|error: too few arguments to function ‘al_show_native_message_box’|<br />/usr/local/include/allegro5/allegro_native_dialog.h|51|note: declared here|<br />||=== Build failed: 9 error(s), 1 warning(s) (0 minute(s), 0 second(s)) ===|<br />=======================================================</p><p>What am I messing up here?  Most errors center around al_show_etc... lines.  </p><p>If more information is needed just let me know.  I will admit that I am new to both Ubuntu and Allegro.  </p><p>Thanks in advance.<br />Sean
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (seanfcarney)</author>
		<pubDate>Thu, 30 Apr 2015 06:57:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>First of all, 5.0.1 is <b>really</b> old. You should use a binary for 5.0.10 or 5.1.9 if available, or compile one of those versions.</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/al_show_native_message_box"><span class="a">al_show_native_message_box</span></a>
</pre></div></div><p>
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">int</span> <a href="http://www.allegro.cc/manual/al_show_native_message_box"><span class="a">al_show_native_message_box</span></a><span class="k2">(</span>
   <a href="http://www.allegro.cc/manual/ALLEGRO_DISPLAY"><span class="a">ALLEGRO_DISPLAY</span></a> <span class="k3">*</span>display,
   <span class="k1">char</span> <span class="k1">const</span> <span class="k3">*</span>title,
   <span class="k1">char</span> <span class="k1">const</span> <span class="k3">*</span>heading,
   <span class="k1">char</span> <span class="k1">const</span> <span class="k3">*</span>text,
   <span class="k1">char</span> <span class="k1">const</span> <span class="k3">*</span>buttons,
   <span class="k1">int</span> flags
<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
</p></div></div><p>

The first call to al_show_native_message_box is wrong because the last parameter should be an integer (ALLEGRO_MESSAGEBOX_YES_NO), not a string (&quot;ALLEGRO_MESSAGEBOX_YES_NO&quot;).</p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/615326/1012715#target">seanfcarney</a> said:</div><div class="quote"><p>
</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/al_show_native_message_box"><span class="a">al_show_native_message_box</span></a><span class="k2">(</span>
   NULL,
   <span class="s">"3.8"</span>,
   <span class="s">"321World!"</span>,
   <span class="s">"Hello world!"</span>,
   <span class="s">"Whatever|Maybe"</span>,
   <span class="s">"ALLEGRO_MESSAGEBOX_YES_NO"</span>
<span class="k2">)</span><span class="k2">;</span>
<a href="http://www.allegro.cc/manual/al_show_native_message_box"><span class="a">al_show_native_message_box</span></a><span class="k2">(</span>NULL, NULL, NULL, Error<span class="k3">!</span>, NULL, NULL<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
</p></div></div><p>
Again, the last parameter should be an int flag ALLEGRO_MESSAGEBOX_YES_NO, not a pointer (NULL)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Thu, 30 Apr 2015 09:06:48 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I suggest using the PPAs with Ubuntu: <a href="http://liballeg.org/download.html#ubuntu-ppa">http://liballeg.org/download.html#ubuntu-ppa</a>, if you want to avoid the (minor) pain of compiling it yourself.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (SiegeLord)</author>
		<pubDate>Thu, 30 Apr 2015 10:51:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>To get the PPA, do I need to create a login?  Could not find a way to acquire the PPA.  Maybe I am misunderstanding the usage of PPA&#39;s though.  From what I gather I need to download the PPA then use a few command line entries to make everything work, is this correct?  I will probably update Allegro5 once I completely install this version.  Just want to successfully install it so that I can see the process and what is involved.  Building from source was not super challenging with the resources provided on the allegro.wiki.</p><p>Changed code to the following:<br />====================================<br />#include &lt;allegro5/allegro.h&gt;<br />#include &lt;allegro5/allegro_native_dialog.h&gt;</p><p>int main(void)</p><p>{</p><p>al_show_native_message_box(NULL, &quot;3.8&quot;,&quot;321World!&quot;, &quot;Hello world!&quot;, &quot;Whatever|Maybe&quot;, 2);</p><p>return -1;</p><p>}<br />====================================</p><p>I omitted the last al_show_native_message_box() statement( maybe in error, looked like error handling statement).  Just trying to simplify code for testing purposes.  When I tried to compile the above I received the following:</p><p>||=== Build: Debug in alkdsjf (compiler: GNU GCC Compiler) ===|<br />obj/Debug/main.o||In function `main&#39;:|<br />/home/sean/Desktop/Test/alkdsjf/main.c|9|undefined reference to `al_show_native_message_box&#39;|<br />||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|</p><p>AGAIN, thanks for dealing with my newbish ways.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (seanfcarney)</author>
		<pubDate>Thu, 30 Apr 2015 16:49:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You need to link to the native dialog addon.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Thu, 30 Apr 2015 23:35:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ve added a small tutorial on how to use PPAs here: <a href="https://wiki.allegro.cc/index.php?title=Install_Allegro_from_Ubuntu_PPAs">https://wiki.allegro.cc/index.php?title=Install_Allegro_from_Ubuntu_PPAs</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (SiegeLord)</author>
		<pubDate>Fri, 01 May 2015 07:04:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks be to the both of you.  </p><p>I upgraded my laptop from Ubuntu 32-bit to Ubuntu 64-bit.  Therefore, I will be repeating this process this weekend.  This will give me the ability to step up to the newest stable Allegro5.</p><p>I would really like to complete the build from source route + proper linking so that I can learn how to properly add new resources to my computer.  </p><p>I will review the PPA (makes me think of Philadelphia Parking Authority, of which I do not have a great relationship with)tutorial as well because I am deficient in this area as well.  </p><p>Thank you both.</p><p>Will update as I proceed this weekend.</p><p>Sean</p><p>EDIT: Wow.  Just reviewed you PPA tutorial and that looks remarkably easy.  <img src="http://www.allegro.cc/forums/smileys/cool.gif" alt="8-)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (seanfcarney)</author>
		<pubDate>Fri, 01 May 2015 16:36:25 +0000</pubDate>
	</item>
</rss>
