delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/09/03:51:23

Message-ID: <375D5D63.3099BB54@home.com>
From: Tebriel <innerlogic AT home DOT com>
X-Mailer: Mozilla 4.6 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Can you use Rhide to program with Winallegro?
References: <Pine DOT SUN DOT 3 DOT 91 DOT 990608114621 DOT 4197O-100000 AT is>
Lines: 116
Date: Tue, 08 Jun 1999 18:16:36 GMT
NNTP-Posting-Host: 24.1.57.119
X-Complaints-To: abuse AT home DOT net
X-Trace: news.rdc1.pa.home.com 928865796 24.1.57.119 (Tue, 08 Jun 1999 11:16:36 PDT)
NNTP-Posting-Date: Tue, 08 Jun 1999 11:16:36 PDT
Organization: @Home Network
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

--------------55020A24CFDF0B47221D3D4F
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Sorry, I should have been more descriptive.  I was only trying to run the
hello world program that comes with Winallegro (ex1.c).  I can't see how it
can get any simpler than this...
I'm pretty sure DJGPP+RSX is installed correctly, since it worked fine without
using Winallegro.  I can't figure out where to go from here... I'll experiment
some more, but everything works fine with Visual C++...please someone spare me
the misery of having to use that instead...

This is the main function I used (from ex1.c), and wrapper.h is included.
I complied with -Zwin32 and -Zmt, (in the Rhide, options->compiler
options->parameter box I added them).
=======================================
int main(int argc, char *argv[])
{
   allegro_init();
   install_keyboard();

#ifndef __WIN32__
   set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0);
#else
   set_gfx_mode(GFX_DIRECTX, 640, 480, 0, 0);
#endif

   install_lost_bitmap_callback(restore_screen);

   set_pallete(desktop_pallete);
   acquire_screen();
   textout_centre(screen, font, "Hello, world!", SCREEN_W/2, SCREEN_H/2, 255);

   release_screen();

   while (!keypressed())
   {
       acquire_screen();
       release_screen();
   }
   readkey();
   return 0;
}
===========================

Eli Zaretskii wrote:

> I submit that this is a wrong guess.  There are no incompatibilities
> between DJGPP programs and Win32 programs invoked by them.  Many users do
> just that every day with no visible problems.  In fact, even COMMAND.COM
> that comes with Windows is a Win32 console application in disguise, so
> any incompatibility should make it impossible to shell out to DOS from
> DJGPP programs, which isn't happening.
>
> Most probably, there's some bug in your program that you should debug.

--------------55020A24CFDF0B47221D3D4F
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<font size=-1>Sorry, I should have been more descriptive.&nbsp; I was only
trying to run the hello world program that comes with Winallegro (ex1.c).&nbsp;
I can't see how it can get any simpler than this...</font>
<br><font size=-1>I'm pretty sure DJGPP+RSX is installed correctly, since
it worked fine without using Winallegro.&nbsp; I can't figure out where
to go from here... I'll experiment some more, but everything works fine
with Visual C++...please someone spare me the misery of having to use that
instead...</font><font size=-1></font>
<p><font size=-1>This is the main function I used (from ex1.c), and wrapper.h
is included.</font>
<br><font size=-1>I complied with -Zwin32 and -Zmt, (in the Rhide, options->compiler
options->parameter box I added them).</font>
<br><font size=-1>=======================================</font>
<br><font size=-1>int main(int argc, char *argv[])</font>
<br><font size=-1>{</font>
<br><font size=-1>&nbsp;&nbsp; allegro_init();</font>
<br><font size=-1>&nbsp;&nbsp; install_keyboard();</font><font size=-1></font>
<p><font size=-1>#ifndef __WIN32__</font>
<br><font size=-1>&nbsp;&nbsp; set_gfx_mode(GFX_AUTODETECT, 320, 200, 0,
0);</font>
<br><font size=-1>#else</font>
<br><font size=-1>&nbsp;&nbsp; set_gfx_mode(GFX_DIRECTX, 640, 480, 0, 0);</font>
<br><font size=-1>#endif</font><font size=-1></font>
<p><font size=-1>&nbsp;&nbsp; install_lost_bitmap_callback(restore_screen);</font><font size=-1></font>
<p><font size=-1>&nbsp;&nbsp; set_pallete(desktop_pallete);</font>
<br><font size=-1>&nbsp;&nbsp; acquire_screen();</font>
<br><font size=-1>&nbsp;&nbsp; textout_centre(screen, font, "Hello, world!",
SCREEN_W/2, SCREEN_H/2, 255);</font>
<br><font size=-1>&nbsp;&nbsp; release_screen();</font><font size=-1></font>
<p><font size=-1>&nbsp;&nbsp; while (!keypressed())</font>
<br><font size=-1>&nbsp;&nbsp; {</font>
<br><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; acquire_screen();</font>
<br><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; release_screen();</font>
<br><font size=-1>&nbsp;&nbsp; }</font>
<br><font size=-1>&nbsp;&nbsp; readkey();</font>
<br><font size=-1>&nbsp;&nbsp; return 0;</font>
<br><font size=-1>}</font>
<br><font size=-1>===========================</font>
<p>Eli Zaretskii wrote:
<blockquote TYPE=CITE>I submit that this is a wrong guess.&nbsp; There
are no incompatibilities
<br>between DJGPP programs and Win32 programs invoked by them.&nbsp; Many
users do
<br>just that every day with no visible problems.&nbsp; In fact, even COMMAND.COM
<br>that comes with Windows is a Win32 console application in disguise,
so
<br>any incompatibility should make it impossible to shell out to DOS from
<br>DJGPP programs, which isn't happening.
<p>Most probably, there's some bug in your program that you should debug.</blockquote>
</html>

--------------55020A24CFDF0B47221D3D4F--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019