Mail Archives: djgpp/1999/06/09/03:51:23
--------------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. 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...</font>
<br><font size=-1>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...</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> allegro_init();</font>
<br><font size=-1> install_keyboard();</font><font size=-1></font>
<p><font size=-1>#ifndef __WIN32__</font>
<br><font size=-1> set_gfx_mode(GFX_AUTODETECT, 320, 200, 0,
0);</font>
<br><font size=-1>#else</font>
<br><font size=-1> set_gfx_mode(GFX_DIRECTX, 640, 480, 0, 0);</font>
<br><font size=-1>#endif</font><font size=-1></font>
<p><font size=-1> install_lost_bitmap_callback(restore_screen);</font><font size=-1></font>
<p><font size=-1> set_pallete(desktop_pallete);</font>
<br><font size=-1> acquire_screen();</font>
<br><font size=-1> textout_centre(screen, font, "Hello, world!",
SCREEN_W/2, SCREEN_H/2, 255);</font>
<br><font size=-1> release_screen();</font><font size=-1></font>
<p><font size=-1> while (!keypressed())</font>
<br><font size=-1> {</font>
<br><font size=-1> acquire_screen();</font>
<br><font size=-1> release_screen();</font>
<br><font size=-1> }</font>
<br><font size=-1> readkey();</font>
<br><font size=-1> 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. There
are no incompatibilities
<br>between DJGPP programs and Win32 programs invoked by them. Many
users do
<br>just that every day with no visible problems. 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 -