Weitere mir unbekannte Fehlermeldung in CodeBlocks (mingw)



  • Hallo,

    Seit etwa 10 Miunten bekomme ich bei einem vorher lauffähigen Projekt jetzt folgende Fehlermeldung beim Kompilieren

    mingw32-g++.exe: cannot specify -o with -c or -S and multiple languages
    Process terminated with status 1 (0 minutes, 4 seconds)
    0 errors, 0 warnings

    Was soll das bedeuten?



  • Hallo,

    hm, es könnte sein, das da ein - bis zwei Compileroptionen zuviel sind, die sich konfliktär verhalten.

    -c
    Compile or assemble the source files, but do not link. The com-
    piler output is an object file corresponding to each source
    file.

    By default, GCC makes the object file name for a source file by
    replacing the suffix .c',.i', .s', etc., with.o'. Use -o
    to select another name.

    GCC ignores any unrecognized input files (those that do not re-
    quire compilation or assembly) with the -c option.

    -o file
    Place output in file file. This applies regardless to whatever
    sort of output GCC is producing, whether it be an executable
    file, an object file, an assembler file or preprocessed C code.

    Since only one output file can be specified, it does not make
    sense to use `-o' when compiling more than one input file, un-
    less you are producing an executable file as output.

    If you do not specify -o', the default is to put an executable file in \a.out', the object file for `source.suffix' in
    `source.o', its assembler file in `source.s', and all prepro-
    cessed C source on standard output.

    -S
    Stop after the stage of compilation proper; do not assemble.
    The output is an assembler code file for each non-assembler in-
    put file specified.

    By default, GCC makes the assembler file name for a source file
    by replacing the suffix .c',.i', etc., with `.s'. Use -o to
    select another name.

    Schau mal, was die Compiler Flags in Code::Blocks dazu sagen.

    MfG

    GPC



  • Hallo,

    Diese Compilerflags gibt man ja normalerweise nicht selbst an. Es scheint an einem fehlerhaften define zu liegen. Ich hatte in den Compilereinstellungen unter "#defines" folgendes eingetragen

    ENUMSFILE "del_enums.h"

    Es scheint wohl so, als ob das hier nicht der richtige Syntax ist. Nach Entfernen dieses Eintrages ging alles wieder. Ich wollte eigentlich nur hier Einträge in Abhängigkeit der Art des Builds eintragen (debug oder release) und die dafür notwendigen defines nicht in eine Headerdatei eintragen.
    Es scheint wohl, dass CodeBlocks hier einen speziellen Syntax benötigt. Ich weiß nur nicht welchen.

    Ciao


Anmelden zum Antworten