Re: [ooc-compiler] Im new here and need 1st help
Brought to you by:
mva
|
From: Stewart G. <sgr...@ip...> - 2001-05-19 23:35:51
|
Ulrich Schmidt wrote:
>
> I did my first steps to get oo2c running and I wanna say
> thanks to all who helped me in the last days with tips and
> information.
>
> And here the results. May be, someone can use them:
> I tried cygwin (latest version 1.3.1). I saw a problem,
> first seen in cygwin 1.1.2 and already fixed in 1.1.3,
> renaming open files. And I'm wondering, the problem
> still exist in 1.3.1. So I stepped back to cygwin 1.1.8
> but it doesnt help - same problems!.
> I installed at last the cygwin 1.1.3 library package in
> the arready installed and newer cygwin collection and
> gcc cant find some entries in the cygwin1.dll. It seems,
> I need to backstep the c compiler also.
> But on the net I found only the 1.1.8 and the 1.3.1
> version. Also new people, who start from scratch, will
> have the same problems. And so my question is:
> Is there a workaround to fix this problem with the
> 1.3.1 (and hopefully newer versions) ?
Here is a simple test for the bug that appeared in 1.1.2. If you run this
code and get a a rename error, then you have found the same bug that was
fixed in 1.1.3. I have only tried this under Windows NT. It is possible
that there is a platform issue specific to Windows 98. If you have time,
please check with the cygwin list to see if they acknowledge the problem,
and can fix it. Frankly, its quite hard to keep up with the changes in
cygwin.
#include <stdio.h>
char * oldName = "test.file^";
char * newName = "test.file";
int main(int argc, char ** argv) {
int result;
FILE * f = fopen(oldName, "w");
result = rename(oldName, newName);
if (result != 0) {
perror("Rename");
} else {
printf("OK!");
}
fclose(f);
}
In the mean time, here is another suggestion.
You can try to get oo2c running under the mingw32 model. There's a patch
for oo2c avaiable here:
http://espc22.murdoch.edu.au/~stewart/files/oo2c_mingw32-0.3.tar.gz
This contains a workaround for the rename problem, and a few other changes
that make oo2c work without requiring cygwin emulation. I tested this with
cygwin 1.1.7.
If you still have problems, let me know. I can try to arrange to get a
working version of cygwin to you (at least, one that works for me!).
Cheers,
Stewart
|