Executing:
# gcc -c file1.c file2.c -o file.o
gives the following errors:
In file included from file2.c:1:
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdio.h:216: error: re
definition of 'vsnprintf'
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdio.h:216: error: re
definition of 'vsnprintf'
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdio.h:276: error: re
definition of 'putchar'
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdio.h:276: error: re
definition of 'putchar'
Passing 250 or so files (about 3MB of sourcecode) to gcc at a time makes gcc
use more than 400MB of memory. Possible more as I had to stop the compilation.
// BEGIN file1.c
#include <stdio.h>
void main1()
{
}
// END file1.c
// BEGIN file2.c
#include <stdio.h>
void main2()
{
}
// END file2.c
Reading specs from C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/specs
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=
mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable
-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --e
nable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-ja
va-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchroniz
ation --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.2 (mingw-special)
--
Summary: Compiling multiple source files at a time gives
redefinition errors
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ch at csh-consult dot dk
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: mingw32-pc-i386
GCC host triplet: mingw32-pc-i386
GCC target triplet: mingw32-pc-i386
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19465