I have some problem with Qt environment. I want to use only environment Qt to console application, I am writing code in C++ but **I must use Cross Compilator. **Of course I have installed correctly in my Qt.
Additional I must use dbus-1.6.8. This is important condition, because I writing code to embedded systems, and library should be this same as was use in device.
http://dbus.freedesktop.org/releases/dbus/dbus-1.6.8.tar.gz
I put directory with source to directory with my project and modified *.pro file add path
TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt
INCLUDEPATH += ./dbus-1.6.8
After this I included to my main.cpp right main header file which includes all next necessary header
#include <dbus/dbus.h>
Next I tried use this library
#include <dbus/dbus.h>
main(){
DBusError err; // both values it is OK Qt finds this type
DBusConnection *dbus_conn;
// but below function doesn't find
dbus_error_init(&err);
dbus_conn = dbus_bus_get_private(DBUS_BUS_SYSTEM, &err);
}
I get error
undefined reference to `dbus_error_init'
undefined reference to `dbus_bus_get_private'
collect2: error: ld returned 1 exit status
Of course above function is exist in source directory I checked. Despite this Qt doesn't find these declaration.
What is wrong ?
PS: Additionally I add tree directory, of course this is not all, but most important directory is visible
.
├── bus
├── cmake
│ ├── bus
│ ├── dbus
│ ├── doc
│ ├── modules
│ ├── test
│ │ └── name-test
│ └── tools
├── dbus
├── doc
├── m4
...
....
....
And only dbus direcytory
├── dbus
│ ├── dbus-address.c
│ ├── dbus-address.h
│ ├── dbus-arch-deps.h
│ ├── dbus-arch-deps.h.in
│ ├── dbus-auth.c
│ ├── dbus-auth.h
│ ├── dbus-auth-script.c
│ ├── dbus-auth-script.h
│ ├── dbus-auth-util.c
│ ├── dbus-bus.c
│ ├── dbus-bus.h
│ ├── dbus-connection.c
│ ├── dbus-connection.h
│ ├── dbus-connection-internal.h
│ ├── dbus-credentials.c
│ ├── dbus-credentials.h
│ ├── dbus-credentials-util.c
│ ├── dbus-dataslot.c
│ ├── dbus-dataslot.h
│ ├── dbus-errors.c
│ ├── dbus-errors.h
│ ├── dbus-file.c
│ ├── dbus-file.h
│ ├── dbus-file-unix.c
│ ├── dbus-file-win.c
│ ├── dbus.h // main header
│ ├── dbus-hash.c
│ ├── dbus-hash.h
│ ├── dbus-internals.c
│ ├── dbus-internals.h
│ ├── dbus-keyring.c
│ ├── dbus-keyring.h
│ ├── dbus-list.c
.....
.....
.....