Mail Archives: djgpp/1996/02/12/15:22:17
If compile the following program using DJGPP v2, should tjhe .exe file be
executable on ANY 386/486 running Windows 3.1? Or does the compiler have
to take into account hardware differences such as floating point?
/* bottles.c -- counting down */
#include <stdio.h>
#define MAX 100
main ()
{
int count = MAX + 1;
while ( --count > 0 ) {
printf (
"%d bottles of beer on the wall, %d bottles of beer!\n",
count, count);
printf("Take one down and pass it around,\n");
printf("%d bottles of beer!\n\n",count-1);
}
}
I use the following to compile
@echo off
redir -o %1.log -eo gcc -v %1.C -o %1
rm %1
@echo.
- Raw text -