GTKmm mit Code::Blocks IDE nutzen



  • Ich hab mir den Artikel zu GTKmm hier im Board durchgelesen und würde mir das auch gerne ansehen, bekomme es aber mit der Code::Blocks-IDE nicht zum laufen.

    Die IDE ist mir allgemein ziemlich neu usw., wo kann ich da die Include-Pfade für den Compiler und den Linker setzen?

    Bei Build->Compiler Options->Compiler->Other Options hab ich das hinzugefügt:
    pkg-config gtkmm-2.4 --cflags

    Und bei Build->Compiler Options->Linker->Other Linker Options das:
    pkg-config gtkmm-2.4 --libs

    Wenn es dann aber ans kompillieren geht, kommt ungefähr so eine Fehlermeldung:

    Switching to target: default
    Compiling: main.cpp
    cc1plus.exe: error: unrecognized command line option "-fcflags`"
    mingw32-g++.exe: `pkg-config: No such file or directory
    mingw32-g++.exe: gtkmm-2.4: No such file or directory
    Process terminated with status 1 (0 minutes, 0 seconds)
    

    Ach.. Immer alles so anstrengend 😞



  • GTKmm_Neuling schrieb:

    Ich hab mir den Artikel zu GTKmm hier im Board durchgelesen und würde mir das auch gerne ansehen, bekomme es aber mit der Code::Blocks-IDE nicht zum laufen.

    Die IDE ist mir allgemein ziemlich neu usw., wo kann ich da die Include-Pfade für den Compiler und den Linker setzen?

    Bei Build->Compiler Options->Compiler->Other Options hab ich das hinzugefügt:
    pkg-config gtkmm-2.4 --cflags

    Und bei Build->Compiler Options->Linker->Other Linker Options das:
    pkg-config gtkmm-2.4 --libs

    Wenn es dann aber ans kompillieren geht, kommt ungefähr so eine Fehlermeldung:

    Switching to target: default
    Compiling: main.cpp
    cc1plus.exe: error: unrecognized command line option "-fcflags`"
    mingw32-g++.exe: `pkg-config: No such file or directory
    mingw32-g++.exe: gtkmm-2.4: No such file or directory
    Process terminated with status 1 (0 minutes, 0 seconds)
    

    Ach.. Immer alles so anstrengend 😞

    Das Problem ist, dass unter Windows die Konsole den Befehl in Hochkommata nicht
    ausfuehrt und das Ergebnis dort einsetzt, sprich er wird nicht evaluiert.

    Oeffne dir eine Konsole und fuehre den Befehl aus, dann kopierst du die Ausgabe
    in 'Other Options' rein.

    gruss
    v R



  • Switching to target: default
    Compiling: main.cpp
    In file included from main.cpp:1:
    C:/GTK/include/gtkmm-2.4/gtkmm.h:29:20: glibmm.h: No such file or directory
    In file included from C:/GTK/include/gdkmm-2.4/gdkmm.h:27,
                     from C:/GTK/include/gtkmm-2.4/gtkmm.h:30,
                     from main.cpp:1:
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:28:21: gdk/gdk.h: No such file or directory
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:29:25: gdkmmconfig.h: No such file or directory
    In file included from C:/GTK/include/gdkmm-2.4/gdkmm.h:27,
                     from C:/GTK/include/gtkmm-2.4/gtkmm.h:30,
                     from main.cpp:1:
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:91: error: `Value' is not a template
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:91: error: expected template-name before '<' token
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:91: error: expected `{' before '<' token
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:91: error: expected unqualified-id before '<' token
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:91: error: expected `;' before '<' token
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:170: error: `Value' is not a template
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:170: error: expected template-name before '<' token
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:170: error: expected `{' before '<' token
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:170: error: expected unqualified-id before '<' token
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:170: error: expected `;' before '<' token
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:203: error: `Value' is not a template
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:203: error: expected template-name before '<' token
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:203: error: expected `{' before '<' token
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:203: error: expected unqualified-id before '<' token
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:203: error: expected `;' before '<' token
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:270: error: `Value' is not a template
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:270: error: expected template-name before '<' token
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:270: error: expected `{' before '<' token
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:270: error: expected unqualified-id before '<' token
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:270: error: expected `;' before '<' token
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:284: error: `GdkGeometry' does not name a type
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:285: error: `GdkNativeWindow' does not name a type
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:294: error: `GdkPoint' does not name a type
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:313: error: ISO C++ forbids declaration of `GdkPoint' with no type
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:313: error: expected `;' before '*' token
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:315: error: expected `;' before "const"
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:315: error: ISO C++ forbids declaration of `GdkPoint' with no type
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:315: error: expected `;' before '*' token
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:317: error: expected `;' before "protected"
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:318: error: `GdkPoint' does not name a type
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h: In member function `void Gdk::Point::set_x(int)':
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:304: error: `gobject_' undeclared (first use this function)
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:304: error: (Each undeclared identifier is reported only once for each function it appears in.)
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h: In member function `void Gdk::Point::set_y(int)':
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:305: error: `gobject_' undeclared (first use this function)
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h: In member function `int Gdk::Point::get_x() const':
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:307: error: `gobject_' undeclared (first use this function)
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h: In member function `int Gdk::Point::get_y() const':
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:308: error: `gobject_' undeclared (first use this function)
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h: At global scope:
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:334: error: ISO C++ forbids declaration of `string' with no type
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:334: error: expected `;' before "CppType"
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:335: error: `GdkAtom' does not name a type
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:336: error: `GdkAtom' does not name a type
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:338: error: `GdkAtom' does not name a type
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:339: error: `GdkAtom' has not been declared
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:339: error: ISO C++ forbids declaration of `parameter' with no type
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:343: error: `GdkAtom' does not name a type
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:344: error: ISO C++ forbids declaration of `string' with no type
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:344: error: invalid use of `::'
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:344: error: expected `;' before "to_cpp_type"
    C:/GTK/include/gdkmm-2.4/gdkmm/types.h:352: error: expected init-declarator before '<' token
    Process terminated with status 1 (0 minutes, 46 seconds)
    52 errors, 0 warnings
    

    😕


Anmelden zum Antworten