0

I'm making a program with glib and dbus libs. However I need to guide compile this on Eclipse.

There are errors for these lines.. "Unresolved inclusion"

 include <dbus/dbus.h>
 include <glib.h>

What kind of options and command needed for Tool Settings(Gcc c++ compiler/gcc c++ linker) on Eclipse?

dipt
  • 827
  • 9
  • 14

2 Answers2

0

Use package config to get the libs and cflags needed

pkg-config --libs glib-2.0 dbus-1

pkg-config --cflags glib-2.0 dbus-1

and put them into according places in the Eclipse UI.

drahnr
  • 6,782
  • 5
  • 48
  • 75
  • 2
    Not very useful, the question was how to do this in eclipse, so you can not say "just do it in eclipse" that completely ignores the question. – Paul Gorbas Sep 22 '14 at 19:27
0

That is a common error on eclipse, it uses the system path, but the system maybe uses a library handler like pkg-config, so normally eclipse displays a lot of missing includes, but the program builds correctly (if you set pkg-config on your makefiles), because is just only eclipse how can't find the headers. to solve this, add /usr/include/glib-2.0/ to your project include path on eclipse or install an addon to handle the includes like Pkg-config support for Eclipse CDT 0.8.0 this one

Patricio Rossi
  • 167
  • 2
  • 5