I had the same question today and solved it by compiling the code with mingw :
from a cygwin console, with mingw64-i686-gcc-core package installed, I ran ./configure CC=/usr/bin/i686-w64-mingw32-gcc.exe
Compilation works fine, and resulting exe is ok under Windows XP and Seven, but under Windows 2000, "r" commands do nothing.
After some tests, it seems off_t type is weirdly defined thus in bbe.h line 52, I removed #ifdef and force define to be :
#define off_t long int
Seems enough at least for the small usage i'm concerned with.
Last edit: pif 2015-10-15
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had it compiled on windows, with the help of http://www.mingw.org/
I have to enable binary file mode explicitly, otherwise it stops on first 0x1A (EOF) character.
In addition to bbe.h line 52 i've also changed:
buffer.c
line 56
from out_stream.fd = open(file,O_WRONLY | O_CREAT | O_TRUNC,S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
to out_stream.fd = open(file,O_WRONLY | O_CREAT | O_TRUNC | O_BINARY,S_IRUSR | S_IWUSR);
line 100
from new->fd = open(file,O_RDONLY);
to new->fd = open(file,O_RDONLY | O_BINARY);
execute.c
line 420 from fseeko to fseeko64
line 550 from c->fd = fopen(file,"w"); to c->fd = fopen(file,"wb");
line 584 from c->fd = fopen(c->s1,"w"); to c->fd = fopen(c->s1,"wb");
line 602 from c->fd = fopen(c->s1,"r"); to c->fd = fopen(c->s1,"rb");
line 616 frim c->fd = fopen(c->s1,"r"); to c->fd = fopen(c->s1,"rb");
then it compiles fine and works well. thanks!
Last edit: Alexey Anisimov 2016-09-09
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi!
I would desesperatly like to compile bbe under a windows 2000 environnement. Has anyone ever done so? Is there and easy way with djgpp?
Thanks,
Jerome Marchand
I had the same question today and solved it by compiling the code with mingw :
from a cygwin console, with mingw64-i686-gcc-core package installed, I ran
./configure CC=/usr/bin/i686-w64-mingw32-gcc.exeCompilation works fine, and resulting exe is ok under Windows XP and Seven, but under Windows 2000, "r" commands do nothing.
After some tests, it seems off_t type is weirdly defined thus in bbe.h line 52, I removed #ifdef and force define to be :
Seems enough at least for the small usage i'm concerned with.
Last edit: pif 2015-10-15
Yes, it is a typo, I have probably ment something like:
typedef long int off_t;
Timo
Hi,
I had it compiled on windows, with the help of http://www.mingw.org/
I have to enable binary file mode explicitly, otherwise it stops on first 0x1A (EOF) character.
In addition to bbe.h line 52 i've also changed:
buffer.c
from
out_stream.fd = open(file,O_WRONLY | O_CREAT | O_TRUNC,S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);to
out_stream.fd = open(file,O_WRONLY | O_CREAT | O_TRUNC | O_BINARY,S_IRUSR | S_IWUSR);from
new->fd = open(file,O_RDONLY);to
new->fd = open(file,O_RDONLY | O_BINARY);execute.c
fseekotofseeko64c->fd = fopen(file,"w");toc->fd = fopen(file,"wb");c->fd = fopen(c->s1,"w");toc->fd = fopen(c->s1,"wb");c->fd = fopen(c->s1,"r");toc->fd = fopen(c->s1,"rb");c->fd = fopen(c->s1,"r");toc->fd = fopen(c->s1,"rb");then it compiles fine and works well. thanks!
Last edit: Alexey Anisimov 2016-09-09