From: R. M. M. <rob...@sa...> - 2014-09-15 13:50:43
|
Hi, I’m a bit confused and getting nuts on a very simple problem. I program C since 25 years now, so it feels a bit dumb to ask this questions. But I’m stuck with mingw at the moment (BTW: I’m using the TDM version). Here is my very unfancy problem / program: #include <stddef.h> int main(){ return 0; } And I get, this error when I compile it using MSYS: $ gcc -v test.c Using built-in specs. COLLECT_GCC=c:\mingw\bin\gcc.exe COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/4.8.1/lto-wrapper.exe Target: x86_64-w64-mingw32 Configured with: ../../../src/gcc-4.8.1/configure --build=x86_64-w64-mingw32 --enable-targets=all --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-libgomp --enable-lto --enable-graphite --enable-cxx-flags=-DWINPTHREAD_STATIC --enable-libstdcxx-debug --enable-threads=posix --enable-version-specific-runtime-libs --enable-fully-dynamic-string --enable-libstdcxx-threads --enable-libstdcxx-time --with-gnu-ld --disable-werror --disable-nls --disable-win32-registry --prefix=/mingw64tdm --with-local-prefix=/mingw64tdm --with-pkgversion=tdm64-2 --withbugurl=http://tdm-gcc.tdragon.net/bugs Thread model: posix gcc version 4.8.1 (tdm64-2) COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64' c:/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/4.8.1/cc1.exe -quiet -v -iprefix c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.8.1/ -D_REENTRANT test.c -quiet -dumpbase test.c -mtune=generic -march=x86-64 -auxbase test -version -o C:\Users\ADMINI~1\AppData\Local\Temp\ccc0yWIc.s GNU C (tdm64-2) version 4.8.1 (x86_64-w64-mingw32) compiled by GNU C version 4.8.1, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.2 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/4.8.1/include" ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../include" ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/4.8.1/include-fixed" ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/include" #include "..." search starts here: #include <...> search starts here: c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.8.1/include c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../include c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.8.1/include-fixed c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/include End of search list. GNU C (tdm64-2) version 4.8.1 (x86_64-w64-mingw32) compiled by GNU C version 4.8.1, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.2 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 6f142dab71d09cf81a62c7f630ff3c02 In file included from c:\mingw\x86_64-w64-mingw32\include\stddef.h:7:0, from c:\mingw\lib\gcc\x86_64-w64-mingw32\4.8.1\include\stddef.h:1, from test.c:1: c:\mingw\x86_64-w64-mingw32\include\crtdefs.h:26:1: error: unknown type name 'size_t' typedef size_t rsize_t; ^ It’s definitely the case, that size_t wasn’t typedefed yet. But IMO this should by handled inside the system headers or am I wrong here? Hope someone can enlighten me... -- Robert M. Münch, Saphirion AG, www.saphirion.com |
From: John E. / T. <td...@td...> - 2014-09-15 14:16:11
|
On 9/15/2014 7:22 AM, Robert M. Münch wrote: > Hi, I’m a bit confused and getting nuts on a very simple problem. I program C since 25 years now, so it feels a bit dumb to ask this questions. But I’m stuck with mingw at the moment (BTW: I’m using the TDM version). Hi Robert, This mailing list does not support the version of GCC you're using - try the MinGW-w64 users list[1] instead. This is covered in TDM-GCC's README. > > Here is my very unfancy problem / program: > > #include <stddef.h> > > int main(){ > return 0; > } > > > And I get, this error when I compile it using MSYS: > > $ gcc -v test.c *snip* > c:\mingw\x86_64-w64-mingw32\include\crtdefs.h:26:1: error: unknown type name 'size_t' > typedef size_t rsize_t; > ^ Your GCC installation appears corrupt. The same code compiles successfully with the same command line for me. Try installing TDM-GCC in an empty directory somewhere other than C:\MinGW. -John E. / TDM [1] - <http://lists.sourceforge.net/mailman/listinfo/mingw-w64-public> |
From: R. M. M. <rob...@sa...> - 2014-09-15 17:01:28
|
Absender: John E. / TDM <td...@td...> Antworten: MinGW Users List <min...@li...>> Datum: 15-Sep.-2014 at 16:17:15 Empfänger: min...@li... <min...@li...>> Betreff: Re: [Mingw-users] simplest program => unknown type name 'size_t' > This mailing list does not support the version of GCC you're using - try > the MinGW-w64 users list[1] instead. This is covered in TDM-GCC's README. Hi, sorry for that. Answering here to not tear apart the thread. > Your GCC installation appears corrupt. The same code compiles > successfully with the same command line for me. Try installing TDM-GCC > in an empty directory somewhere other than C:\MinGW. Thanks, that solved it. I think I made a mistake by having installed MinGW (the original one) once and than later added TDM-GCC, without cleaning things up. Works now. -- Robert M. Münch, Saphirion AG, www.saphirion.com |