Results 1 to 8 of 8

Thread: Anjuta can't find any header files

  1. #1
    Join Date
    Mar 2005
    Location
    Austin
    Beans
    339
    Distro
    Ubuntu 7.04 Feisty Fawn

    Anjuta can't find any header files

    Hi, I am trying out anjuta for the first time but I am having trouble getting it to find some of the libraries I want to use. I want to use dbus, I have install dbus-dev and all the build-essential and gnome development packages as I can compile applications fine outside of anjuta

    The trouble is everytime I try to compile my project I get

    Code:
    make main.o
    gcc -DHAVE_CONFIG_H -I. -I. -I.. -DPACKAGE_LOCALE_DIR=\""/usr/local/share/locale"\" -DPACKAGE_SRC_DIR=\""."\" -DPACKAGE_DATA_DIR=\""/usr/local/share"\"    -Wall -g -g -O2 -MT main.o -MD -MP -MF ".deps/main.Tpo" -c -o main.o main.c
    /home/idn/Projects/gtask/src/main.c:26:25: error: "dbus/dbus.h": No such file or directory
    /home/idn/Projects/gtask/src/main.c:27:37: error: dbus/dbus-glib-bindings.h: No such file or directory
    make: *** [main.o] Error 1
    Completed... unsuccessful
    Total time taken: 0 secs
    The include statement looks like

    Code:
    #include "dbus/dbus-glib.h"
    #include <dbus/dbus-glib-bindings.h>
    When I type in a terminal

    Code:
    idn@idn-laptop:~$ locate dbus-glib.h
    /usr/include/dbus-1.0/dbus/dbus-glib.h
    So the header file is there, I guess anjuta doesnt know about it or something, any ideas?

  2. #2
    Join Date
    Apr 2006
    Location
    Seattle
    Beans
    2,893
    Distro
    Ubuntu Development Release

    Re: Anjuta can't find any header files

    Change the quotes in the first include statement to <> and it should solve at least one error, if not all.

  3. #3
    Join Date
    Mar 2005
    Location
    Austin
    Beans
    339
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Anjuta can't find any header files

    Quote Originally Posted by jacobmp92 View Post
    Change the quotes in the first include statement to <> and it should solve at least one error, if not all.
    No I'm affraid it didn't , it still says it cant find the directory. Could it be anything else maybe?

  4. #4
    Join Date
    Feb 2007
    Beans
    236

    Re: Anjuta can't find any header files

    What happens if you just use:

    #include <dbus-glib.h>
    #include <dbus-glib-bindings.h>

  5. #5
    Join Date
    Mar 2005
    Location
    Austin
    Beans
    339
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Anjuta can't find any header files

    Quote Originally Posted by j_g View Post
    What happens if you just use:

    #include <dbus-glib.h>
    #include <dbus-glib-bindings.h>
    Code:
    make main.o
    gcc -DHAVE_CONFIG_H -I. -I. -I.. -DPACKAGE_LOCALE_DIR=\""/usr/local/share/locale"\" -DPACKAGE_SRC_DIR=\""."\" -DPACKAGE_DATA_DIR=\""/usr/local/share"\"    -Wall -g -g -O2 -MT main.o -MD -MP -MF ".deps/main.Tpo" -c -o main.o main.c
    /home/idn/Projects/gtask/src/main.c:26:23: error: dbus-glib.h: No such file or directory
    /home/idn/Projects/gtask/src/main.c:27:32: error: dbus-glib-bindings.h: No such file or directory
    make: *** [main.o] Error 1
    Completed... unsuccessful
    Total time taken: 0 secs
    No luck im afraid Other things dont seem to work like
    Code:
    #include <gnome.h>
    Either

  6. #6
    Join Date
    Jan 2006
    Beans
    961

    Re: Anjuta can't find any header files

    always use pkg-config for this stuff when you can; it will always work and be portable

    Code:
    lars@ibmr52:~/programming/lisp$ pkg-config --list-all|grep dbus
    ndesk-dbus-glib-1.0   NDesk.DBus.GLib - GLib integration for NDesk.DBus, the D-Bus IPC library
    dbus-glib-1           dbus-glib - GLib integration for the free desktop message bus
    ndesk-dbus-1.0        NDesk.DBus - Managed D-Bus IPC protocol library and CLR binding
    dbus-sharp            DBus - DBus
    dbus-python           dbus-python - Python bindings for D-Bus
    dbus-1                dbus - Free desktop message bus
    
    lars@ibmr52:~/programming/lisp$ pkg-config --cflags dbus-glib-1
    -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  
    
    lars@ibmr52:~/programming/lisp$ pkg-config --libs dbus-glib-1
    -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0
    as you can see it spits out the correct compiler and linker arguments ..

    your IDE should be able to handle this if you enter `pkg-config --cflags dbus-glib-1` with backquotes (edit: well, not really sure how this would work with anjuta) as shown for compiler and linker arguments

    here's how i do this stuff from a different setup/ide/environment: http://nostdal.org/~lars/writings/
    Last edited by lnostdal; February 28th, 2007 at 02:48 PM.

  7. #7
    Join Date
    Jan 2007
    Location
    the third world
    Beans
    Hidden!

    Re: Anjuta can't find any header files

    I agree with the suggestion to use pkg-config.

    Or, you could simply include /usr/include/dbus-1.0 in your includes path. I don't know how that is done in Ajunta. But from the command line, you simply add a -I/usr/include/dbus-1.0 to your compile command.
    IESVS FELLAT IN INFERNVM

  8. #8
    Join Date
    Oct 2004
    Beans
    80

    Re: Anjuta can't find any header files

    Anjuta has a GUI dialog for telling it what libraries you want to use. I'm not in front of my computer right now, so I can't say exactly where they are. I'll post later with the info.

    Edit: well, I haven't used this thing since they went to 2.0. A lot has changed. I installed it and tried to find where you specify libraries, but had no luck. Sorry.
    Last edited by kanem; February 28th, 2007 at 08:33 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •