[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: [LI] Help compilation problem !!!



n Mon, Oct 11, 1999 at 05:21:53AM -0700, Satish Pagare came up with:
  $#> Hi  All,
  $#>   I have a strange problem while compiling the following code
  $#> on RH6.0.
  $#> -----begin code
  $#> #include<stdio.h>
  $#> FILE *fp = stderr;
  $#> main()
  $#> {
  $#> }
  $#>
  $#> [kram@linux2idc net]$ cc a.c
  $#> a.c:2: initializer element is not constant

This is because so far std(out|in|err) used to be constants but in
glibc 2.1, they have been implemented as variables. And in C, you can
initialize variables only to constants and not to some other variables.  

        --manas


--------------------------------------------------------------------
The Linux India Mailing List Archives are now available.  Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.