This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Fwd: Re: Problem compiling NONMEM with mingw gfortran 4.3.0 builds]

Forwarding to gcc list since there seems to be a C related problem here as well. Example code below.

-------- Original Message --------
Subject: Re: Problem compiling NONMEM with mingw gfortran 4.3.0 builds
Date: Sat, 21 Jul 2007 10:13:32 -0700
From: Jerry DeLisle <>
To: Danny Smith <>, Fortran List <>
References: <000301c7c8d0$b2ee4160$cb4861cb@THOMAS>


I experimented with your simple Hello World in C running on Cygwin, writing to
CONOUT$.  It does not error out, but does nothing.

On the gfortran side it creates a file named CONOUT$.

I would like to intercept this file name on mingw and cygwin systems and attempt
to map it to stdio in the gfortran runtime library. (band aid fix)

A couple of questions:

1) Is there a #define somewhere that I can use to conditionally compile this
"band aid" just for mingw and cygwin?  I have looked in config.h and did not
find anything useful.

2) At least on cygwin, since the example does not work for the C version (I have
not tried mingw, but presume it works there) is there a "system" level fix for
this problem that would be more appropriate?

Best regards,



$ cat test.c
#include <fcntl.h>
#include <sys/stat.h>
#include <stdlib.h>

int main()
 int fd= _open ("CONOUT$", _O_RDWR);
  if (fd >= 0)
   _write (fd, "Hello world", sizeof ("Hello world"));
 return 0;

$ cat test.f
100    format('Hello, world!')

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]