Cygwin 1.5.24 g++ 3.3.3 / Problem mit size_t et al. schon bei "Hello World"



  • Hallo !

    Mit hello.cpp

    #include <iostream>
    
    int main(int argc, char* argv[]) {
    
        std::cout << "Hello World" << std::endl;
        return 42;		
    }
    

    kompilert mit

    g++ -v hello.cpp

    erhalte ich u.a. folgende Fehlermeldungen

    g++ -v schrieb:

    In file included from /usr/include/c++/3.3.3/cstdio:50,
    from /usr/include/c++/3.3.3/i686-pc-cygwin/bits/c++io.h:35,
    from /usr/include/c++/3.3.3/bits/fpos.h:44,
    from /usr/include/c++/3.3.3/iosfwd:49,
    from /usr/include/c++/3.3.3/ios:44,
    from /usr/include/c++/3.3.3/ostream:45,
    from /usr/include/c++/3.3.3/iostream:45,
    from hello.cpp:1:
    /usr/include/c++/3.3.3/cstddef:48:20: stddef.h: No such file or directory
    In file included from /usr/include/c++/3.3.3/cstdio:50,
    from /usr/include/c++/3.3.3/i686-pc-cygwin/bits/c++io.h:35,
    from /usr/include/c++/3.3.3/bits/fpos.h:44,
    from /usr/include/c++/3.3.3/iosfwd:49,
    from /usr/include/c++/3.3.3/ios:44,
    from /usr/include/c++/3.3.3/ostream:45,
    from /usr/include/c++/3.3.3/iostream:45,
    from hello.cpp:1:
    /usr/include/c++/3.3.3/cstddef:52: error: ptrdiff_t' not declared /usr/include/c++/3.3.3/cstddef:53: error:size_t' not declared
    In file included from /usr/include/c++/3.3.3/cstdio:52,
    from /usr/include/c++/3.3.3/i686-pc-cygwin/bits/c++io.h:35,
    from /usr/include/c++/3.3.3/bits/fpos.h:44,
    from /usr/include/c++/3.3.3/iosfwd:49,
    from /usr/include/c++/3.3.3/ios:44,
    from /usr/include/c++/3.3.3/ostream:45,
    from /usr/include/c++/3.3.3/iostream:45,
    from hello.cpp:1:
    /usr/include/stdio.h:34:20: stddef.h: No such file or directory
    /usr/include/stdio.h:37:20: stdarg.h: No such file or directory

    also dass stddef.h , stdarg.h nicht gefunden werden und somit mehrere defines und typedefs fehlen.

    Auf dem System sind mehrere Compiler installiert; u.a. mingw mit codeblocks.
    Deshalb habe ich mal versucht die Codeblocks-Header in den include-path aufzunehmen (-I<Verzeichnisname>). Der Erfolg bleibt aus; u.a. waren wint_t, size_t und pointer_t undefiniert.

    Suche im Net ergab v.a. den Rat ein Neuinstallation zu versuchen (na, ja...); der Erfolg blieb aus.

    Wie ich feststelle sind natürlich Defnitionen für size_t und pointer_t in stddef.h in Vereichnissen die nicht im Standardincludepfad liegen vorhanden; nämlich in den stddef.h in

    C:\Programme\cygwin\lib\gcc\i686-pc-mingw32\3.4.4\include => /lib/gcc/i686-pc-mingw32/3.4.4/include

    und

    C:\Programme\cygwin\lib\gcc\i686-pc-cygwin\3.4.4\include => /lib/gcc/i686-pc-cygwin/3.4.4/include

    vorhanden (man beachte die abweichende Versionsnummer!); damit (-I/lib/...) kompilierts zwar aber der (3.3.3) Linker findet die "crtbegin.o" nicht trotz eines -L<Verzeichnisname in dem sie liegt>.

    => Irgendwelche Ideen wie man das Problem lösen kann? <=

    Grüsse

    *this

    Anhang:

    Windows XP Pro SP 2
    Cygwin1.dll 1.5.24-cr-0x5f1

    Cygwin Package Information schrieb:

    Last downloaded files to: D:\cygwin
    Last downloaded files from: ftp://ftp.gwdg.de/pub/linux/sources.redhat.com/cygwin

    Package Version
    _update-info-dir 00517-1
    alternatives 1.3.29a-1
    ash 20040127-3
    atk 1.10.3-1
    base-files 3.7-1
    base-passwd 2.2-1
    bash 3.2.17-15
    binutils 20060817-1
    bzip2 1.0.3-2
    coreutils 6.9-2
    crypt 1.1-1
    cygrunsrv 1.16-1
    cygutils 1.3.1-1
    cygwin 1.5.24-2
    cygwin-doc 1.4-4
    diffutils 2.8.7-1
    editrights 1.01-1
    expat 1.95.8-2
    findutils 4.3.5-1
    fontconfig 2.4.1-5
    freetype2 2.1.9-1
    gawk 3.1.5-4
    gcc-core 3.4.4-3
    gcc-g++ 3.3.3-3
    gcc-mingw-core 20050522-1
    gcc-mingw-g++ 20050522-1
    gdb 20041228-3
    gdbm 1.8.3-8
    gettext 0.15-1
    glib2 2.10.3-1
    glib2-runtime 2.10.3-1
    grep 2.5.1a-2
    groff 1.18.1-2
    gtk2-x11 2.6.10-1
    gtk2-x11-runtime 2.6.10-1
    gvim 6.4-1
    gzip 1.3.12-1
    less 381-1
    libbz2_1 1.0.3-2
    libdb4.2 4.2.52-1
    libexpat0 1.95.8-2
    libfontconfig1 2.4.1-5
    libfreetype26 2.1.9-1
    libgcrypt 1.2.1-1
    libgdbm 1.8.0-5
    libgdbm-devel 1.8.3-8
    libgdbm3 1.8.3-3
    libgdbm4 1.8.3-8
    libgpg-error 1.1-1
    libiconv2 1.11-1
    libintl 0.10.38-3
    libintl1 0.10.40-1
    libintl2 0.12.1-3
    libintl3 0.14.5-1
    libintl8 0.15-1
    libjpeg62 6b-12
    libncurses5 5.2-1
    libncurses6 5.2-8
    libncurses7 5.3-4
    libncurses8 5.5-3
    libpcre0 6.6-1
    libpng12 1.2.12-1
    libpopt0 1.6.4-4
    libreadline4 4.1-2
    libreadline5 4.3-5
    libreadline6 5.2.4-8
    libtiff4 3.6.0-5
    libXft 2.1.6-1
    libXft1 1.0.0-1
    libXft2 2.1.6-1
    libxml2 2.6.26-1
    libxml2-python 2.6.26-1
    libxslt 1.1.17-1
    login 1.9-7
    man 1.6e-1
    mingw-runtime 3.12-4
    mktemp 1.5-4
    ncurses 5.5-3
    openssl 0.9.8e-3
    pango 1.8.1-1
    pango-runtime 1.8.1-1
    pcre 6.6-1
    pylibxml2 2.6.26-1
    python 2.5.1-1
    rebase 2.4.3-1
    run 1.1.10-1
    sed 4.1.5-2
    tar 1.16.1-1
    tcltk 20060202-1
    termcap 20050421-1
    terminfo 5.5_20061104-1
    texinfo 4.8a-1
    vim 7.0.223-1
    w32api 3.9-1
    which 1.7-1
    X-startup-scripts 1.0.11-1
    xorg-x11-base 6.8.99.901-1
    xorg-x11-bin 6.8.99.901-1
    xorg-x11-bin-dlls 6.8.99.901-1
    xorg-x11-bin-lndir 6.8.99.901-1
    xorg-x11-etc 6.8.99.901-1
    xorg-x11-fenc 6.8.99.901-1
    xorg-x11-fnts 6.8.99.901-1
    xorg-x11-libs-data 6.8.99.901-1
    xorg-x11-xwin 6.8.99.901-1
    zlib 1.2.3-2


Anmelden zum Antworten