<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Trying to use Open Watcom V1.9</title>
		<link>http://www.allegro.cc/forums/view/618503</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Mon, 27 Sep 2021 16:31:44 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m trying to use Allegro to make DOS games. A long time ago I tried DJGPP and it wouldn&#39;t compile and was just generally sub-par.<br />I want to use open watcom for several reasons, speed, simplicity, the IDE.</p><p>So I found this alleg.lib compiled for open watcom:<br /><a href="http://matejhorvat.si/en/dos/allegwat/index.htm">http://matejhorvat.si/en/dos/allegwat/index.htm</a></p><p>I placed that in the appropriate libs folder. I then copied all the allegro include files into the watcom include &quot;h&quot; folder. I added the two switches to the compiler /s /3s.</p><p>I figured that&#39;s all I needed to do.</p><p>When I compile a small example program, it has errors cause it starts reading the aldjgpp.h file even though there is an alwatcom.h. In the program I just #include &quot;allegro.h&quot;</p><p>So in one of the headers, it must be telling it to use the djgpp version. I thought #define ALLEGRO_WATCOM might work, but didn&#39;t.</p><p>It&#39;s crazy there is a watcom header, I just can&#39;t make it use it.</p><p>Maybe there will be more errors down the road, but I want to keep trying.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (OgreVorbis)</author>
		<pubDate>Tue, 14 Sep 2021 22:20:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Check if it was actually compiled for Watcom by using ALLEGRO_DJGPP and ALLEGRO_WATCOM macros.</p><p><a href="https://liballeg.org/stabledocs/en/alleg042.html">https://liballeg.org/stabledocs/en/alleg042.html</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Tue, 14 Sep 2021 22:46:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks for getting back so fast. <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /></p><p>I did define ALLEGRO_WATCOM, so how should I check if it&#39;s defined, you mean like ifdef.</p><p>Is there anything I should put in the linker/compiler options? I just put that define right at the beginning of the main source.</p><p>BTW I am not an ultimate C programmer. I mostly use C#, so it&#39;s possible I&#39;m doing something wrong, but I am skilled enough to use allegro.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (OgreVorbis)</author>
		<pubDate>Tue, 14 Sep 2021 23:00:16 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>ALLEGRO_DJGPP and ALLEGRO_WATCOM are defined by the build process. You should not define them yourself.</p><p>If you can&#39;t compile a simple hello allegro program that includes allegro.h, then you probably need to recompile allegro yourself for WATCOM.</p><p>If it&#39;s including aldjgpp.h something is definitely wrong.</p><p><b>EDIT</b><br />I would follow the build instructions given by the link you shared to build allegro yourself.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Tue, 14 Sep 2021 23:09:30 +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/618503/1050729#target">OgreVorbis</a> said:</div><div class="quote"><p>So I found this alleg.lib compiled for open watcom:<br /><a href="http://matejhorvat.si/en/dos/allegwat/index.htm">http://matejhorvat.si/en/dos/allegwat/index.htm</a></p></div></div><p>

Did you follow the instructions on that page for compiling Allegro? I&#39;ve only used DHGPP for DOS, so cannot help with compiling for Watcom.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (DanielH)</author>
		<pubDate>Wed, 15 Sep 2021 03:07:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I FIGURED IT OUT!</p><p>Two problems:<br />1. I had to run the fix.bat watcom. I thought that was part of the build process for allegro itself and considering I downloaded the pre-compiled lib, I skipped that step. However, this step is still necessary to tell allegro it&#39;s using watcom.</p><p>2. This is the big one. The alleg.lib file does NOT go under &quot;Library Files&quot; in the linker switches. It goes under &quot;Libraries&quot; instead. I found this confusing cause I don&#39;t know the purpose of that.</p><p>So to anyone who wants to do this:<br />----------------------------------<br />First - download the pre-compiled alleg.lib from that link.<br />Download the allegro source also and extract it.<br />Run fix.bat watcom.<br />Copy the lib you downloaded to .\WATCOM\lib386\dos<br />Copy the fixed include files into .\WATCOM\h<br />.\WATCOM\h\ALLEGRO\PLATFORM\ALWATCOM.H, comment out line 36.<br />Make a new project in WATCOM using DOS/4GW.<br />Goto Linker Switches #2 and put alleg.lib under Libraries (NOT Library Files).<br />Goto C Compiler switches #5 and disable stack depth check.<br />Goto C Compiler switches #10 and select 80386 stack-based calling -3s.</p><p>That should do it. Now you can just add the exhello.c (hello world example) to your project and do a makeall. Copy DOS/4GW.exe into the program&#39;s folder and run DOSBox. It&#39;s working!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (OgreVorbis)</author>
		<pubDate>Wed, 15 Sep 2021 17:16:59 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Nice work. <img src="http://www.allegro.cc/forums/smileys/cool.gif" alt="8-)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Wed, 15 Sep 2021 20:56:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>FFFFFFFFFFFFF.</p><p>No, it doesn&#39;t FULLY work, I was mistaken. For some reason it only works with the simple hello world, but for anything more than that, it doesn&#39;t work at all. I figured the hello world would be enough to show it working, but NO!</p><p>exhello.c(38): Error! E1058: Cannot use typedef &#39;BITMAP&#39; as a variable<br />exhello.c(38): Error! E1011: Symbol &#39;bmp&#39; has not been declared<br />exhello.c(38): Warning! W111: Meaningless use of an expression<br />exhello.c(39): Error! E1058: Cannot use typedef &#39;PALETTE&#39; as a variable<br />exhello.c(39): Error! E1009: Expecting &#39;;&#39; but found &#39;pal&#39;<br />exhello.c(40): Error! E1011: Symbol &#39;pal&#39; has not been declared<br />exhello.c(40): Warning! W102: Type mismatch (warning)<br />exhello.c(40): Note! I2003: source conversion type is &#39;int &#39;<br />exhello.c(40): Note! I2004: target conversion type is &#39;struct RGB *&#39;<br />exhello.c(40): Note! I2002: &#39;load_bitmap&#39; defined in: D:\WATCOM\h\allegro\datafile.h(91)</p><p>And, there&#39;s more...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (OgreVorbis)</author>
		<pubDate>Wed, 15 Sep 2021 23:09:55 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If a symbol is not declared, then you&#39;re probably not including the right header files. Can you share some code?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (amarillion)</author>
		<pubDate>Fri, 17 Sep 2021 20:56:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>amarillion - It looks like the standard Windows conflicts. Perhaps including &lt;alwin.h&gt; would fix it?</p><p><b>EDIT</b><br />DJGPP doesn&#39;t work on Windows 10. <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />/ It&#39;s source also uses a very old version of C library.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Fri, 17 Sep 2021 22:45:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The code is just an extension of the exhello.c I&#39;m now just trying to display an image on the screen.</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 &lt;allegro.h&gt;</span>
<span class="number">  2</span>
<span class="number">  3</span><span class="k1">int</span> main<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span>
<span class="number">  4</span><span class="k2">{</span>
<span class="number">  5</span>   <span class="c">/* you should always do this at the start of Allegro programs */</span>
<span class="number">  6</span>   <span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/allegro_init"><span class="a">allegro_init</span></a><span class="k2">(</span><span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> <span class="n">0</span><span class="k2">)</span>
<span class="number">  7</span>      <span class="k1">return</span> <span class="n">1</span><span class="k2">;</span>
<span class="number">  8</span>
<span class="number">  9</span>   <span class="c">/* set up the keyboard handler */</span>
<span class="number"> 10</span>   <a href="http://www.allegro.cc/manual/install_keyboard"><span class="a">install_keyboard</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span> 
<span class="number"> 11</span>
<span class="number"> 12</span>   <span class="c">/* set a graphics mode sized 320x200 */</span>
<span class="number"> 13</span>   <span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/set_gfx_mode"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_VESA3, <span class="n">640</span>, <span class="n">480</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> <span class="n">0</span><span class="k2">)</span> <span class="k2">{</span>
<span class="number"> 14</span>     <a href="http://www.allegro.cc/manual/allegro_message"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"Unable to set any graphic mode\n%s\n"</span>, <a href="http://www.allegro.cc/manual/allegro_error"><span class="a">allegro_error</span></a><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 15</span>     <span class="k1">return</span> <span class="n">1</span><span class="k2">;</span>
<span class="number"> 16</span>   <span class="k2">}</span>
<span class="number"> 17</span>
<span class="number"> 18</span>   <span class="c">/* set the color palette */</span>
<span class="number"> 19</span>   <span class="c">//set_palette(desktop_palette);</span>
<span class="number"> 20</span>
<span class="number"> 21</span>   <span class="c">/* clear the screen to white */</span>
<span class="number"> 22</span>   <a href="http://www.allegro.cc/manual/clear_to_color"><span class="a">clear_to_color</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/screen"><span class="a">screen</span></a>, <a href="http://www.allegro.cc/manual/makecol"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>, <span class="n">255</span>, <span class="n">255</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 23</span>
<span class="number"> 24</span>   <span class="c">/* you don't need to do this, but on some platforms (eg. Windows) things</span>
<span class="number"> 25</span><span class="c">    * will be drawn more quickly if you always acquire the screen before</span>
<span class="number"> 26</span><span class="c">    * trying to draw onto it.</span>
<span class="number"> 27</span><span class="c">    */</span>
<span class="number"> 28</span>   <span class="c">//acquire_screen();</span>
<span class="number"> 29</span>   <a href="http://www.allegro.cc/manual/BITMAP"><span class="a">BITMAP</span></a> <span class="k3">*</span>bmp<span class="k2">;</span>
<span class="number"> 30</span>   <a href="http://www.allegro.cc/manual/PALETTE"><span class="a">PALETTE</span></a> pal<span class="k2">;</span>
<span class="number"> 31</span>   bmp <span class="k3">=</span> <a href="http://www.allegro.cc/manual/load_bitmap"><span class="a">load_bitmap</span></a><span class="k2">(</span><span class="s">"MOUNTAIN.PCX"</span>, pal<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 32</span>   <a href="http://www.allegro.cc/manual/set_palette"><span class="a">set_palette</span></a><span class="k2">(</span>pal<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 33</span>   <a href="http://www.allegro.cc/manual/blit"><span class="a">blit</span></a><span class="k2">(</span>bmp, <a href="http://www.allegro.cc/manual/screen"><span class="a">screen</span></a>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, bmp-&gt;w, bmp-&gt;h<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 34</span>
<span class="number"> 35</span>   <span class="c">/* write some text to the screen with black letters and transparent background */</span>
<span class="number"> 36</span>   <a href="http://www.allegro.cc/manual/textout_centre_ex"><span class="a">textout_centre_ex</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/screen"><span class="a">screen</span></a>, <a href="http://www.allegro.cc/manual/font"><span class="a">font</span></a>, <span class="s">"Hello, world!"</span>, <a href="http://www.allegro.cc/manual/SCREEN_W"><span class="a">SCREEN_W</span></a><span class="k3">/</span><span class="n">2</span>, <a href="http://www.allegro.cc/manual/SCREEN_H"><span class="a">SCREEN_H</span></a><span class="k3">/</span><span class="n">2</span>, <a href="http://www.allegro.cc/manual/makecol"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span><span class="k2">)</span>, <span class="k3">-</span><span class="n">1</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 37</span>
<span class="number"> 38</span>   <span class="c">/* you must always release bitmaps before calling any input functions */</span>
<span class="number"> 39</span>   <a href="http://www.allegro.cc/manual/release_screen"><span class="a">release_screen</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 40</span>
<span class="number"> 41</span>   <span class="c">/* wait for a key press */</span>
<span class="number"> 42</span>   <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>
<span class="number"> 43</span>
<span class="number"> 44</span>   <a href="http://www.allegro.cc/manual/destroy_bitmap"><span class="a">destroy_bitmap</span></a><span class="k2">(</span>bmp<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 45</span>
<span class="number"> 46</span>   <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 47</span><span class="k2">}</span>
<span class="number"> 48</span>
<span class="number"> 49</span><a href="http://www.allegro.cc/manual/END_OF_MAIN"><span class="a">END_OF_MAIN</span></a><span class="k2">(</span><span class="k2">)</span>
</div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (OgreVorbis)</author>
		<pubDate>Sun, 19 Sep 2021 03:34:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>BITMAP and PALETTE are also defined by windows.h but I don&#39;t see you including that anywhere.</p><p>I&#39;m guessing you need to declare them as a struct BITMAP and struct PALETTE.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Sun, 19 Sep 2021 19:26:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Did you try including winalleg.h instead of allegro.h?<br />(as recommended by Bob <a href="https://www.allegro.cc/forums/thread/233656/233691#target">in 2003</a>?)</p><p>[edit] oops1 - sorry Edgar you&#39;d already suggested that, oops2 - sorry Ogre you did mention you were making DOS games in your first post <img src="http://www.allegro.cc/forums/smileys/lipsrsealed.gif" alt=":-X" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Hull)</author>
		<pubDate>Sun, 19 Sep 2021 20:34:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I can&#39;t post an update here anymore. Maybe the thread was locked, so I edit this post.</p><p>The reason was that this is C89 and doesn&#39;t support declaring variables in the middle of a code block. The variables all had to be moved to the top AND IT&#39;S NOW WORKING PERFECTLY 100%.<br /><img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /><br />So my procedure above works fine, you just need to be sure to follow the C89 standards.</p><p>Original post:</p><p>No, none of that worked. Same results.<br />......
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (OgreVorbis)</author>
		<pubDate>Mon, 20 Sep 2021 23:29:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You can&#39;t reply to your own post to prevent double posting. You can however edit your post and send it to the top.</p><p>Now that I&#39;ve replied, you can reply again.</p><p>I&#39;m interested in getting Watcom to work, since CMake supports Watcom WMake files.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Mon, 27 Sep 2021 16:31:44 +0000</pubDate>
	</item>
</rss>
