Richie Baldwin wrote: > When trying to compile a c file using stderr, I have the declaration: > FILE *foo = stderr; > and it keeps giving me "Initializer element is not constant". This will happen on windows platfrom because stderr is imported from a dll library, Effectively this means: extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */ #define _iob (*_imp___iob) /* An array of FILE */ #define stderr (&_iob[STDERR_FILENO]) so stderr is indeed not known at compile time. A workaround is to use an init function: #include <stdio.h> FILE * foo; void intit_foo() { foo = stderr; } int main() { init_foo(); ... } Danny