Thread: netbeans gtkmm missing includes

  1. #1
    Registered User
    Join Date
    Jul 2011
    Posts
    62

    Exclamation netbeans gtkmm missing includes

    Hello everyone! I'm back with more questions. Right now I'm using netbeans IDE, with manually connected MinGW. I'm trying to get a simple GTKmm program to compile:
    Code:
    #include <gtkmm.h>
    
    using namespace std;
    
    int main(int argc, char *argv[])
    {
        Gtk::Main kit(argc, argv);
    
        Gtk::Window window;
    
        Gtk::Main::run(window);
    
        return 0;
    }
    but I get compiler errors coming out (yes I have checked that the compiler works):
    Code:
    "/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
    make[1]: Entering directory `/c/Users/Sonik/Documents/NetBeansProjects/test_compiler'
    "/usr/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/test_compiler.exe
    make[2]: Entering directory `/c/Users/Sonik/Documents/NetBeansProjects/test_compiler'
    mkdir -p build/Debug/MinGW-Windows
    rm -f build/Debug/MinGW-Windows/main.o.d
    g++.exe    -c -g -I/C/GTK -I/C/GTK/include -I/C/GTK/include/gtkmm-2.4 -I/C/GTK/include/gtkmm-2.4/gtkmm -I/C/GTK/include/gtkmm-2.4/gtkmm/private -I/C/GTK/include/atkmm-1.6 -I/C/GTK/include/gdkmm-2.4 -I/C/GTK/include/gideon -I/C/GTK/include/glibmm-2.4 -I/C/GTK/include/libglademm-2.4 -I/C/GTK/include/libxml++-2.6 -I/C/GTK/include/pangomm-1.4 -I/C/GTK/include/sigc++-2.0 -I/C/GTK/include/atkmm-1.6/atkmm -I/C/GTK/include/gdkmm-2.4/gdkmm -I/C/GTK/include/glibmm-2.4/glibmm -I/C/GTK/include/glibmm-2.4/glibmm_generate_extra_defs -I/C/GTK/include/libglademm-2.4/libglademm -I/C/GTK/include/libxml++-2.6/libxml++ -I/C/GTK/include/pangomm-1.4/pangomm -I/C/GTK/include/sigc++-2.0/sigc++ -MMD -MP -MF build/Debug/MinGW-Windows/main.o.d -o build/Debug/MinGW-Windows/main.o main.cpp
                     from c:/GTK/include/glibmm-2.4/glibmm.h:27,
                     from c:/GTK/include/gtkmm-2.4/gtkmm.h:29,
                     from main.cpp:8:
    In file included from c:/GTK/include/glibmm-2.4/glibmm/arrayhandle.h:24:0,
    c:/GTK/include/glibmm-2.4/glibmm/containerhandle_shared.h:23:26: fatal error: glibmmconfig.h: No such file or directory
    compilation terminated.
    make[2]: *** [build/Debug/MinGW-Windows/main.o] Error 1
    make[1]: *** [.build-conf] Error 2
    make: *** [.build-impl] Error 2
    make[2]: Leaving directory `/c/Users/Sonik/Documents/NetBeansProjects/test_compiler'
    make[1]: Leaving directory `/c/Users/Sonik/Documents/NetBeansProjects/test_compiler'
    
    BUILD FAILED (exit value 2, total time: 2s)
    I have added the GTK+/GTKmm include directories as much as possible in project options, this is the final include additional path variable:

    Code:
    C:/GTK;C:/GTK/include;C:/GTK/include/gtkmm-2.4;C:/GTK/include/gtkmm-2.4/gtkmm;C:/GTK/include/gtkmm-2.4/gtkmm/private;C:/GTK/include/atkmm-1.6;C:/GTK/include/gdkmm-2.4;C:/GTK/include/gideon;C:/GTK/include/glibmm-2.4;C:/GTK/include/libglademm-2.4;C:/GTK/include/libxml++-2.6;C:/GTK/include/pangomm-1.4;C:/GTK/include/sigc++-2.0;C:/GTK/include/atkmm-1.6/atkmm;C:/GTK/include/gdkmm-2.4/gdkmm;C:/GTK/include/glibmm-2.4/glibmm;C:/GTK/include/glibmm-2.4/glibmm_generate_extra_defs;C:/GTK/include/libglademm-2.4/libglademm;C:/GTK/include/libxml++-2.6/libxml++;C:/GTK/include/pangomm-1.4/pangomm;C:/GTK/include/sigc++-2.0/sigc++
    can anyone please explain, why is Netbeans not detecting several GTK+ headers, and how could I fix it?

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Does glibmmconfig.h exists?
    If yes, what is the path to it?

    What compiler name and version?
    Standard Mingw, MSys, or Cygwin?
    If Cygwin, what version of Cygwin? 1.7 or ?

    Tim S.
    Last edited by stahta01; 07-03-2011 at 08:49 AM.

  3. #3
    Registered User
    Join Date
    Jul 2011
    Posts
    62
    Yes they all exist. It seems i was forgetting to add the pkg-config linker and compiler options. In fact I use standard MinGW with MSYS. but the problem isn't solved yet.
    I managed to install pkg-config on my windows system (basically just putting the compiler binary in the bin of MinGW) but I cant seem to be able to have it detect my GTK settings. I added PKG_CONFIG_PATH to the enviroment variables (as requested by the tool) (the exact variable would be...
    Code:
    PKG_CONFIG_PATH
    C:\GTK\lib\pkgconfig;
    )
    but it still seems not to be able to detect it (even when I cd into that dir)
    ...
    the code im using to test if it is detecting is
    Code:
    pkg-config gtkmm-2.4 --modversion
    needed out put is the version of gtkmm
    resulting output is a statement that the .pc file is missing.

  4. #4
    Registered User
    Join Date
    Jul 2011
    Posts
    62
    OK. I reset the enviroment variable, copied all the .pc files from Octaves directory. I'm still missing one, and its not on the system.
    The file name is "gdk-2.0.pc". After some searching, i only have gdkmm-2.4.pc which is probably unrelated. Would this mean that GTKmm installed incorrectly?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting C Compiler for NetBeans
    By Soulzityr in forum C Programming
    Replies: 3
    Last Post: 03-30-2010, 09:00 AM
  2. Using Gtkmm with sockets
    By lautarox in forum C++ Programming
    Replies: 10
    Last Post: 03-02-2010, 11:32 AM
  3. install gtkmm in dev c++
    By curt22 in forum Windows Programming
    Replies: 0
    Last Post: 09-08-2007, 04:46 PM
  4. Help me setting c++ gtkmm glade on vista
    By eHobayyeb in forum Tech Board
    Replies: 8
    Last Post: 06-27-2007, 12:02 PM
  5. Problems installing GTKmm
    By LiKWiD in forum C++ Programming
    Replies: 6
    Last Post: 03-29-2004, 11:31 PM

Tags for this Thread