Qt break down by MongoDB C++ initialization - c++

I am fresh in using MongoDB c++ in Qt.
I already installed Boost, MongoDB c driver, MongoDB c++ driver and also tested DB's connection on VS2017 successfully following MongoDB tutorial(https://mongodb.github.io/mongo-cxx-driver/mongocxx-v3/tutorial/).
However, a lot of problem occurred when I wanted to apply the same code on Qt.
The overall setting:
Win10
Qt Creator v4.6.0 with
Qt v5.10.1 MSVC2017 64-bit
Microsoft Visual C++ Compiler 15.0
Debugger CDB x64
MongoDB v3.6.3
Boost 1.66.0 as lib64-msvc-14.1
Mongo c driver v1.9.3
Mongo cxx driver r3.2.0
The program just break down when initializing the instance as the following picture:
Break Down
The program also crashed when only using
$mongocxx::instance inst()
C4930 warning was produced when compiling as using
$mongocxx::instance inst( )
I guess there are two potential reason for my problem
Linking error
Wrong version of boost/mongocxx driver
Following is definition in .pro file
INCLUDEPATH += $$PWD/driver/c/include/libbson-1.0
DEPENDPATH += $$PWD/driver/c/include/libbson-1.0
LIBS += -L$$PWD/driver/c/lib -lbson-1.0
LIBS += -L$$PWD/driver/c/lib -lbson-static-1.0
INCLUDEPATH += $$PWD/driver/c/include/libmongoc-1.0
DEPENDPATH += $$PWD/driver/c/include/libmongoc-1.0
LIBS += -L$$PWD/driver/c/lib -lmongoc-1.0
LIBS += -L$$PWD/driver/c/lib -lmongoc-static-1.0
INCLUDEPATH += $$PWD/driver/c++/include/bsoncxx/v_noabi
DEPENDPATH += $$PWD/driver/c++/include/bsoncxx/v_noabi
LIBS += -L$$PWD/driver/c++/lib -lbsoncxx
INCLUDEPATH += $$PWD/driver/c++/include/mongocxx/v_noabi
DEPENDPATH += $$PWD/driver/c++/include/mongocxx/v_noabi
LIBS += -L$$PWD/driver/c++/lib -lmongocxx
INCLUDEPATH += $$PWD/driver/boost_1_66_0
DEPENDPATH += $$PWD/driver/boost_1_66_0
LIBS += -L$$PWD/driver/boost_1_66_0/lib64-msvc-14.1 \
-lboost_atomic-vc141-mt-gd-x64-1_66 \
-lboost_atomic-vc141-mt-x64-1_66 \
-lboost_bzip2-vc141-mt-gd-x64-1_66 \
-lboost_bzip2-vc141-mt-x64-1_66 \
-lboost_chrono-vc141-mt-gd-x64-1_66 \
-lboost_chrono-vc141-mt-x64-1_66 \
-lboost_container-vc141-mt-gd-x64-1_66 \
-lboost_container-vc141-mt-x64-1_66 \
-lboost_context-vc141-mt-gd-x64-1_66 \
-lboost_context-vc141-mt-x64-1_66 \
-lboost_coroutine-vc141-mt-gd-x64-1_66 \
-lboost_coroutine-vc141-mt-x64-1_66 \
-lboost_date_time-vc141-mt-gd-x64-1_66 \
-lboost_date_time-vc141-mt-x64-1_66 \
-lboost_fiber-vc141-mt-gd-x64-1_66 \
-lboost_fiber-vc141-mt-x64-1_66 \
-lboost_filesystem-vc141-mt-gd-x64-1_66 \
-lboost_filesystem-vc141-mt-x64-1_66 \
-lboost_graph-vc141-mt-gd-x64-1_66 \
-lboost_graph-vc141-mt-x64-1_66 \
-lboost_iostreams-vc141-mt-gd-x64-1_66 \
-lboost_iostreams-vc141-mt-x64-1_66 \
-lboost_locale-vc141-mt-gd-x64-1_66 \
-lboost_locale-vc141-mt-x64-1_66 \
-lboost_log-vc141-mt-gd-x64-1_66 \
-lboost_log-vc141-mt-x64-1_66 \
-lboost_log_setup-vc141-mt-gd-x64-1_66 \
-lboost_log_setup-vc141-mt-x64-1_66 \
-lboost_math_c99-vc141-mt-gd-x64-1_66 \
-lboost_math_c99-vc141-mt-x64-1_66 \
-lboost_math_c99f-vc141-mt-gd-x64-1_66 \
-lboost_math_c99f-vc141-mt-x64-1_66 \
-lboost_math_c99l-vc141-mt-gd-x64-1_66 \
-lboost_math_c99l-vc141-mt-x64-1_66 \
-lboost_math_tr1-vc141-mt-gd-x64-1_66 \
-lboost_math_tr1-vc141-mt-x64-1_66 \
-lboost_math_tr1f-vc141-mt-gd-x64-1_66 \
-lboost_math_tr1f-vc141-mt-x64-1_66 \
-lboost_math_tr1l-vc141-mt-gd-x64-1_66 \
-lboost_math_tr1l-vc141-mt-x64-1_66 \
-lboost_prg_exec_monitor-vc141-mt-gd-x64-1_66 \
-lboost_prg_exec_monitor-vc141-mt-x64-1_66 \
-lboost_program_options-vc141-mt-gd-x64-1_66 \
-lboost_program_options-vc141-mt-x64-1_66 \
-lboost_python-vc141-mt-gd-x64-1_66 \
-lboost_python-vc141-mt-x64-1_66 \
-lboost_random-vc141-mt-gd-x64-1_66 \
-lboost_random-vc141-mt-x64-1_66 \
-lboost_regex-vc141-mt-gd-x64-1_66 \
-lboost_regex-vc141-mt-x64-1_66 \
-lboost_serialization-vc141-mt-gd-x64-1_66 \
-lboost_serialization-vc141-mt-x64-1_66 \
-lboost_signals-vc141-mt-gd-x64-1_66 \
-lboost_signals-vc141-mt-x64-1_66 \
-lboost_stacktrace_noop-vc141-mt-gd-x64-1_66 \
-lboost_stacktrace_noop-vc141-mt-x64-1_66 \
-lboost_stacktrace_windbg-vc141-mt-gd-x64-1_66 \
-lboost_stacktrace_windbg-vc141-mt-x64-1_66 \
-lboost_stacktrace_windbg_cached-vc141-mt-gd-x64-1_66 \
-lboost_stacktrace_windbg_cached-vc141-mt-x64-1_66 \
-lboost_system-vc141-mt-gd-x64-1_66 \
-lboost_system-vc141-mt-x64-1_66 \
-lboost_thread-vc141-mt-gd-x64-1_66 \
-lboost_thread-vc141-mt-x64-1_66 \
-lboost_timer-vc141-mt-gd-x64-1_66 \
-lboost_timer-vc141-mt-x64-1_66 \
-lboost_type_erasure-vc141-mt-gd-x64-1_66 \
-lboost_type_erasure-vc141-mt-x64-1_66 \
-lboost_unit_test_framework-vc141-mt-gd-x64-1_66 \
-lboost_unit_test_framework-vc141-mt-x64-1_66 \
-lboost_wave-vc141-mt-gd-x64-1_66 \
-lboost_wave-vc141-mt-x64-1_66 \
-lboost_wserialization-vc141-mt-gd-x64-1_66 \
-lboost_wserialization-vc141-mt-x64-1_66 \
-lboost_zlib-vc141-mt-gd-x64-1_66 \
-lboost_zlib-vc141-mt-x64-1_66 \
-llibboost_atomic-vc141-mt-gd-x64-1_66 \
-llibboost_atomic-vc141-mt-s-x64-1_66 \
-llibboost_atomic-vc141-mt-sgd-x64-1_66 \
-llibboost_atomic-vc141-mt-x64-1_66 \
-llibboost_bzip2-vc141-mt-gd-x64-1_66 \
-llibboost_bzip2-vc141-mt-s-x64-1_66 \
-llibboost_bzip2-vc141-mt-sgd-x64-1_66 \
-llibboost_bzip2-vc141-mt-x64-1_66 \
-llibboost_chrono-vc141-mt-gd-x64-1_66 \
-llibboost_chrono-vc141-mt-s-x64-1_66 \
-llibboost_chrono-vc141-mt-sgd-x64-1_66 \
-llibboost_chrono-vc141-mt-x64-1_66 \
-llibboost_container-vc141-mt-gd-x64-1_66 \
-llibboost_container-vc141-mt-s-x64-1_66 \
-llibboost_container-vc141-mt-sgd-x64-1_66 \
-llibboost_container-vc141-mt-x64-1_66 \
-llibboost_context-vc141-mt-gd-x64-1_66 \
-llibboost_context-vc141-mt-s-x64-1_66 \
-llibboost_context-vc141-mt-sgd-x64-1_66 \
-llibboost_context-vc141-mt-x64-1_66 \
-llibboost_coroutine-vc141-mt-gd-x64-1_66 \
-llibboost_coroutine-vc141-mt-s-x64-1_66 \
-llibboost_coroutine-vc141-mt-sgd-x64-1_66 \
-llibboost_coroutine-vc141-mt-x64-1_66 \
-llibboost_date_time-vc141-mt-gd-x64-1_66 \
-llibboost_date_time-vc141-mt-s-x64-1_66 \
-llibboost_date_time-vc141-mt-sgd-x64-1_66 \
-llibboost_date_time-vc141-mt-x64-1_66 \
-llibboost_exception-vc141-mt-gd-x64-1_66 \
-llibboost_exception-vc141-mt-s-x64-1_66 \
-llibboost_exception-vc141-mt-sgd-x64-1_66 \
-llibboost_exception-vc141-mt-x64-1_66 \
-llibboost_fiber-vc141-mt-gd-x64-1_66 \
-llibboost_fiber-vc141-mt-s-x64-1_66 \
-llibboost_fiber-vc141-mt-sgd-x64-1_66 \
-llibboost_fiber-vc141-mt-x64-1_66 \
-llibboost_filesystem-vc141-mt-gd-x64-1_66 \
-llibboost_filesystem-vc141-mt-s-x64-1_66 \
-llibboost_filesystem-vc141-mt-sgd-x64-1_66 \
-llibboost_filesystem-vc141-mt-x64-1_66 \
-llibboost_graph-vc141-mt-gd-x64-1_66 \
-llibboost_graph-vc141-mt-s-x64-1_66 \
-llibboost_graph-vc141-mt-sgd-x64-1_66 \
-llibboost_graph-vc141-mt-x64-1_66 \
-llibboost_iostreams-vc141-mt-gd-x64-1_66 \
-llibboost_iostreams-vc141-mt-s-x64-1_66 \
-llibboost_iostreams-vc141-mt-sgd-x64-1_66 \
-llibboost_iostreams-vc141-mt-x64-1_66 \
-llibboost_locale-vc141-mt-gd-x64-1_66 \
-llibboost_locale-vc141-mt-s-x64-1_66 \
-llibboost_locale-vc141-mt-sgd-x64-1_66 \
-llibboost_locale-vc141-mt-x64-1_66 \
-llibboost_log-vc141-mt-gd-x64-1_66 \
-llibboost_log-vc141-mt-s-x64-1_66 \
-llibboost_log-vc141-mt-sgd-x64-1_66 \
-llibboost_log-vc141-mt-x64-1_66 \
-llibboost_log_setup-vc141-mt-gd-x64-1_66 \
-llibboost_log_setup-vc141-mt-s-x64-1_66 \
-llibboost_log_setup-vc141-mt-sgd-x64-1_66 \
-llibboost_log_setup-vc141-mt-x64-1_66 \
-llibboost_math_c99-vc141-mt-gd-x64-1_66 \
-llibboost_math_c99-vc141-mt-s-x64-1_66 \
-llibboost_math_c99-vc141-mt-sgd-x64-1_66 \
-llibboost_math_c99-vc141-mt-x64-1_66 \
-llibboost_math_c99f-vc141-mt-gd-x64-1_66 \
-llibboost_math_c99f-vc141-mt-s-x64-1_66 \
-llibboost_math_c99f-vc141-mt-sgd-x64-1_66 \
-llibboost_math_c99f-vc141-mt-x64-1_66 \
-llibboost_math_c99l-vc141-mt-gd-x64-1_66 \
-llibboost_math_c99l-vc141-mt-s-x64-1_66 \
-llibboost_math_c99l-vc141-mt-sgd-x64-1_66 \
-llibboost_math_c99l-vc141-mt-x64-1_66 \
-llibboost_math_tr1-vc141-mt-gd-x64-1_66 \
-llibboost_math_tr1-vc141-mt-s-x64-1_66 \
-llibboost_math_tr1-vc141-mt-sgd-x64-1_66 \
-llibboost_math_tr1-vc141-mt-x64-1_66 \
-llibboost_math_tr1f-vc141-mt-gd-x64-1_66 \
-llibboost_math_tr1f-vc141-mt-s-x64-1_66 \
-llibboost_math_tr1f-vc141-mt-sgd-x64-1_66 \
-llibboost_math_tr1f-vc141-mt-x64-1_66 \
-llibboost_math_tr1l-vc141-mt-gd-x64-1_66 \
-llibboost_math_tr1l-vc141-mt-s-x64-1_66 \
-llibboost_math_tr1l-vc141-mt-sgd-x64-1_66 \
-llibboost_math_tr1l-vc141-mt-x64-1_66 \
-llibboost_prg_exec_monitor-vc141-mt-gd-x64-1_66 \
-llibboost_prg_exec_monitor-vc141-mt-s-x64-1_66 \
-llibboost_prg_exec_monitor-vc141-mt-sgd-x64-1_66 \
-llibboost_prg_exec_monitor-vc141-mt-x64-1_66 \
-llibboost_program_options-vc141-mt-gd-x64-1_66 \
-llibboost_program_options-vc141-mt-s-x64-1_66 \
-llibboost_program_options-vc141-mt-sgd-x64-1_66 \
-llibboost_program_options-vc141-mt-x64-1_66 \
-llibboost_python-vc141-mt-gd-x64-1_66 \
-llibboost_python-vc141-mt-s-x64-1_66 \
-llibboost_python-vc141-mt-sgd-x64-1_66 \
-llibboost_python-vc141-mt-x64-1_66 \
-llibboost_random-vc141-mt-gd-x64-1_66 \
-llibboost_random-vc141-mt-s-x64-1_66 \
-llibboost_random-vc141-mt-sgd-x64-1_66 \
-llibboost_random-vc141-mt-x64-1_66 \
-llibboost_regex-vc141-mt-gd-x64-1_66 \
-llibboost_regex-vc141-mt-s-x64-1_66 \
-llibboost_regex-vc141-mt-sgd-x64-1_66 \
-llibboost_regex-vc141-mt-x64-1_66 \
-llibboost_serialization-vc141-mt-gd-x64-1_66 \
-llibboost_serialization-vc141-mt-s-x64-1_66 \
-llibboost_serialization-vc141-mt-sgd-x64-1_66 \
-llibboost_serialization-vc141-mt-x64-1_66 \
-llibboost_signals-vc141-mt-gd-x64-1_66 \
-llibboost_signals-vc141-mt-s-x64-1_66 \
-llibboost_signals-vc141-mt-sgd-x64-1_66 \
-llibboost_signals-vc141-mt-x64-1_66 \
-llibboost_stacktrace_noop-vc141-mt-gd-x64-1_66 \
-llibboost_stacktrace_noop-vc141-mt-s-x64-1_66 \
-llibboost_stacktrace_noop-vc141-mt-sgd-x64-1_66 \
-llibboost_stacktrace_noop-vc141-mt-x64-1_66 \
-llibboost_stacktrace_windbg-vc141-mt-gd-x64-1_66 \
-llibboost_stacktrace_windbg-vc141-mt-s-x64-1_66 \
-llibboost_stacktrace_windbg-vc141-mt-sgd-x64-1_66 \
-llibboost_stacktrace_windbg-vc141-mt-x64-1_66 \
-llibboost_stacktrace_windbg_cached-vc141-mt-gd-x64-1_66 \
-llibboost_stacktrace_windbg_cached-vc141-mt-s-x64-1_66 \
-llibboost_stacktrace_windbg_cached-vc141-mt-sgd-x64-1_66 \
-llibboost_stacktrace_windbg_cached-vc141-mt-x64-1_66 \
-llibboost_system-vc141-mt-gd-x64-1_66 \
-llibboost_system-vc141-mt-s-x64-1_66 \
-llibboost_system-vc141-mt-sgd-x64-1_66 \
-llibboost_system-vc141-mt-x64-1_66 \
-llibboost_test_exec_monitor-vc141-mt-gd-x64-1_66 \
-llibboost_test_exec_monitor-vc141-mt-s-x64-1_66 \
-llibboost_test_exec_monitor-vc141-mt-sgd-x64-1_66 \
-llibboost_test_exec_monitor-vc141-mt-x64-1_66 \
-llibboost_thread-vc141-mt-gd-x64-1_66 \
-llibboost_thread-vc141-mt-s-x64-1_66 \
-llibboost_thread-vc141-mt-sgd-x64-1_66 \
-llibboost_thread-vc141-mt-x64-1_66 \
-llibboost_timer-vc141-mt-gd-x64-1_66 \
-llibboost_timer-vc141-mt-s-x64-1_66 \
-llibboost_timer-vc141-mt-sgd-x64-1_66 \
-llibboost_timer-vc141-mt-x64-1_66 \
-llibboost_type_erasure-vc141-mt-gd-x64-1_66 \
-llibboost_type_erasure-vc141-mt-s-x64-1_66 \
-llibboost_type_erasure-vc141-mt-sgd-x64-1_66 \
-llibboost_type_erasure-vc141-mt-x64-1_66 \
-llibboost_unit_test_framework-vc141-mt-gd-x64-1_66 \
-llibboost_unit_test_framework-vc141-mt-s-x64-1_66 \
-llibboost_unit_test_framework-vc141-mt-sgd-x64-1_66 \
-llibboost_unit_test_framework-vc141-mt-x64-1_66 \
-llibboost_wave-vc141-mt-gd-x64-1_66 \
-llibboost_wave-vc141-mt-s-x64-1_66 \
-llibboost_wave-vc141-mt-sgd-x64-1_66 \
-llibboost_wave-vc141-mt-x64-1_66 \
-llibboost_wserialization-vc141-mt-gd-x64-1_66 \
-llibboost_wserialization-vc141-mt-s-x64-1_66 \
-llibboost_wserialization-vc141-mt-sgd-x64-1_66 \
-llibboost_wserialization-vc141-mt-x64-1_66 \
-llibboost_zlib-vc141-mt-gd-x64-1_66 \
-llibboost_zlib-vc141-mt-s-x64-1_66 \
-llibboost_zlib-vc141-mt-sgd-x64-1_66 \
-llibboost_zlib-vc141-mt-x64-1_66
Is there any mistake in linking driver?
Or the version of driver I used is not correct (But it is normal using VS2017)
Does anyone encounter same problem?
TKS

I replied to you on the mongodb mailing list, but many of the things you are doing here are incorrect. You shouldn't be linking both the static and dynamic versions of the libraries. You shouldn't be linking both the retail and debug versions of the boost libraries, etc. You should ensure that you are linking consistent versions of the boost, QT, and mongocxx/bsoncxx/libmongoc/libbson libraries w.r.t. debug/release, static/dynamic, etc.
I recommend starting from first principles and building up incrementally with things as needed. Take one of the examples from the mongocxx project, and set up a project that succesfully builds it against the driver you have built. Then add QT support.

Related

GNU linker: errors if pointer in header file is declared NULL and/or extern [duplicate]

This question already has answers here:
How do I use extern to share variables between source files?
(19 answers)
Closed 3 years ago.
I am testing some patches (C language) for BOINC client (C++ language), and during compilation I got a GNU linker error about GDBusProxy* proxy = NULL; line in file linux/user_idle_time_detection.h (complete file hereunder). So I started doing some attempts to modify the affected line, but I got two different errors (case 1 and 2 hereunder), and I really cannot understand why the linker does not like:
the extern statement
the pointer initialized at NULL;
Thank you
CASE 1
extern GDBusProxy* proxy;
returns error
/usr/bin/ld: boinc_client-user_idle_time_detection.o: in function `create_proxy':
/builddir/build/BUILD/boinc-client_release-7.14-7.14.2/client/linux/user_idle_time_detection.c:5: undefined reference to `proxy'
/usr/bin/ld: boinc_client-user_idle_time_detection.o: in function `get_user_idle_time':
/builddir/build/BUILD/boinc-client_release-7.14-7.14.2/client/linux/user_idle_time_detection.c:21: undefined reference to `proxy'
collect2: error: ld returned 1 exit status
CASE 2
Both
extern GDBusProxy* proxy = NULL;
and
GDBusProxy* proxy = NULL;
return error
/usr/bin/ld: boinc_client-hostinfo_unix.o:/builddir/build/BUILD/boinc-client_release-7.14-7.14.2/client/linux/user_idle_time_detection.h:7: multiple definition of `proxy'; boinc_client-user_idle_time_detection.o:/builddir/build/BUILD/boinc-client_release-7.14-7.14.2/client/linux/user_idle_time_detection.h:7: first defined here
CASE 3
The following works good instead
GDBusProxy* proxy;
SOURCE FILES
linux/user_idle_time_detection.h
#ifndef USER_IDLE_TIME_DETECTION_H
#define USER_IDLE_TIME_DETECTION_H
#include <gio/gio.h>
#include "gnome/gnome_dbus_interface.h"
GDBusProxy* proxy = NULL;
GDBusProxy* create_proxy();
double get_user_idle_time();
#endif /* USER_IDLE_TIME_DETECTION_H */
linux/user_idle_time_detection.c
#include <gio/gio.h>
#include "user_idle_time_detection.h"
GDBusProxy* create_proxy()
{
proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_NONE,
NULL,
GNOME_DBUS_SERVICE,
GNOME_DBUS_PATH_SETTINGS,
GNOME_DBUS_INTERFACE_SETTINGS,
NULL, NULL);
return proxy;
}
double get_user_idle_time()
{
guint64 user_idle_time;
double user_idle_time_double;
GError* error = NULL;
GVariant* ret = NULL;
proxy = create_proxy();
ret = g_dbus_proxy_call_sync(proxy,
GNOME_DBUS_METHOD_SETTINGS,
NULL,
G_DBUS_CALL_FLAGS_NONE, -1,
NULL, &error);
if (!ret) {
g_dbus_error_strip_remote_error (error);
g_print ("GetIdletime failed: %s\n", error->message);
g_error_free (error);
return;
}
g_variant_get(ret, "(t)", &user_idle_time);
user_idle_time_double = (double)user_idle_time;
g_variant_unref (ret);
return user_idle_time_double;
}
linux/gnome/gnome_dbus_interface.h
#ifndef GNOME_DBUS_INTERFACE_H
#define GNOME_DBUS_INTERFACE_H
#define GNOME_DBUS_SERVICE "org.gnome.Mutter.IdleMonitor"
#define GNOME_DBUS_PATH_SETTINGS "/org/gnome/Mutter/IdleMonitor/Core"
#define GNOME_DBUS_INTERFACE_SETTINGS "org.gnome.Mutter.IdleMonitor"
#define GNOME_DBUS_METHOD_SETTINGS "GetIdletime"
#endif /* GNOME_DBUS_INTERFACE_H */
hostinfo_unix.cpp
#include "linux/user_idle_time_detection.h"
CUT
bool HOST_INFO::users_idle(bool check_all_logins, double idle_time_to_run) {
double user_idle_time;
double user_pref_idle_time_in_ms;
//user_idle_time = get_user_idle_time();
user_pref_idle_time_in_ms = (idle_time_to_run * 60000);
CUT
Makefile.am
## -*- mode: makefile; tab-width: 4 -*-
## $Id$
include $(top_srcdir)/Makefile.incl
if ENABLE_CLIENT_RELEASE
AM_LDFLAGS += -static-libtool-libs
## for an entirely statically linked library, you may want to try
## -all-static instead. There's a good chance it won't work properly,
## so we'll use the safer "-static-libtool-libs" by default.
else
if DYNAMIC_CLIENT
## if libtool starts to need flags for dynamic linking, add them here
else
AM_LDFLAGS += -static
endif
endif ## ENABLE_CLIENT_RELEASE
LIBS += $(CLIENTLIBS)
if OS_DARWIN
LIBS += -framework IOKit -framework Foundation -framework ScreenSaver -framework Cocoa -framework CoreServices
endif
bin_PROGRAMS = boinc_client boinccmd
if !OS_WIN32
bin_PROGRAMS += switcher
endif
boinccmd_SOURCES = boinc_cmd.cpp
boinccmd_DEPENDENCIES = $(LIBBOINC)
boinccmd_CPPFLAGS = $(AM_CPPFLAGS)
boinccmd_LDFLAGS = $(AM_LDFLAGS) -L$(top_srcdir)/lib
boinccmd_LDADD = $(LIBBOINC) $(BOINC_EXTRA_LIBS) $(PTHREAD_LIBS)
boinc_client_SOURCES = \
acct_mgr.cpp \
acct_setup.cpp \
app.cpp \
app_config.cpp \
app_control.cpp \
app_start.cpp \
async_file.cpp \
check_state.cpp \
client_msgs.cpp \
client_state.cpp \
client_types.cpp \
coproc_sched.cpp \
cpu_sched.cpp \
cs_account.cpp \
cs_apps.cpp \
cs_benchmark.cpp \
cs_cmdline.cpp \
cs_files.cpp \
cs_notice.cpp \
cs_platforms.cpp \
cs_prefs.cpp \
cs_proxy.cpp \
cs_scheduler.cpp \
cs_statefile.cpp \
cs_trickle.cpp \
current_version.cpp \
dhrystone.cpp \
dhrystone2.cpp \
file_names.cpp \
file_xfer.cpp \
gpu_amd.cpp \
gpu_detect.cpp \
gpu_intel.cpp \
gpu_nvidia.cpp \
gpu_opencl.cpp \
gui_http.cpp \
gui_rpc_server.cpp \
gui_rpc_server_ops.cpp \
hostinfo_linux.cpp \
hostinfo_network.cpp \
http_curl.cpp \
log_flags.cpp \
mac_address.cpp \
main.cpp \
net_stats.cpp \
pers_file_xfer.cpp \
project.cpp \
project_list.cpp \
result.cpp \
rr_sim.cpp \
sandbox.cpp \
scheduler_op.cpp \
thread.cpp \
time_stats.cpp \
whetstone.cpp \
work_fetch.cpp \
linux/user_idle_time_detection.c
boinc_client_DEPENDENCIES = $(LIBBOINC)
boinc_client_CPPFLAGS = $(AM_CPPFLAGS) $(GIO_CFLAGS) $(GLIB_CFLAGS)
boinc_client_CXXFLAGS = $(AM_CXXFLAGS) $(SSL_CXXFLAGS)
boinc_client_LDFLAGS = $(AM_LDFLAGS) $(SSL_LDFLAGS) $(GIO_LIBS) $(GLIB_LIBS) -L$(top_srcdir)/lib
if OS_WIN32
boinc_client_CXXFLAGS += -I$(top_srcdir)/coprocs/NVIDIA/include
boinc_client_SOURCES += hostinfo_win.cpp \
hostinfo_wsl.cpp \
sysmon_win.cpp \
win/boinc_cli.rc \
win/res/boinc.ico
else
if OS_DARWIN
boinc_client_LDFLAGS += -Wl,-flat_namespace,-undefined,dynamic_lookup
else
boinc_client_SOURCES += hostinfo_unix.cpp
endif
endif
boinc_client_LDADD = $(LIBBOINC) $(LIBBOINC_CRYPT) $(BOINC_EXTRA_LIBS) $(PTHREAD_LIBS)
boinc_clientdir = $(bindir)
if OS_ARM_LINUX
boinc_client_LDADD += libwhetneon.a libwhetvfp.a
noinst_LIBRARIES = libwhetneon.a libwhetvfp.a
libwhetneon_a_SOURCES = whetstone.cpp
libwhetneon_a_CXXFLAGS = $(boinc_client_CXXFLAGS) -DANDROID_NEON -mfloat-abi=softfp -mfpu=neon
libwhetvfp_a_SOURCES = whetstone.cpp
libwhetvfp_a_CXXFLAGS = $(boinc_client_CXXFLAGS) -DANDROID_VFP -mfloat-abi=softfp -mfpu=vfp
endif
switcher_SOURCES = switcher.cpp
switcher_LDFLAGS = $(AM_LDFLAGS) -L../lib
switcher_LDADD = $(LIBBOINC)
## since we are using libtool we need some magic to get boinc and boinc_client
## to both be installed properly. The next two rules do that...
all-local: boinc$(EXEEXT)
boinc$(EXEEXT): boinc_client$(EXEEXT)
rm -f boinc$(EXEEXT) .libs/boinc$(EXEEXT)
$(LN) boinc_client$(EXEEXT) boinc$(EXEEXT)
if test -f .libs/boinc_client$(EXEEXT) ; then $(LN) .libs/boinc_client$(EXEEXT) .libs/boinc$(EXEEXT) ; fi
install-exec-hook:
rm -f $(DESTDIR)$(exec_prefix)/bin/boinc$(EXEEXT)
$(LN) $(DESTDIR)$(exec_prefix)/bin/boinc_client$(EXEEXT) $(DESTDIR)$(exec_prefix)/bin/boinc$(EXEEXT)
## these source files need to be specified because no rule uses them.
EXTRA_DIST = *.h \
mac \
translation \
win
Makefile.curl.am
## -*- mode: make; tab-width: 4 -*-
## $Id$
include $(top_srcdir)/Makefile.incl
# (for a while we used "-static -static-libgcc" on linux, but this is obsolete
# now)
#STATIC_FLAGS=#STATIC_FLAGS#
client-bin: #CLIENT_BIN_FILENAME#
LIBS += #CLIENTLIBS#
bin_PROGRAMS = boinc_client
EXTRA_PROGRAMS = cpu_benchmark
boinc_client_SOURCES = \
acct_mgr.cpp \
acct_setup.cpp \
app.cpp \
app_control.cpp \
app_graphics.cpp \
app_start.cpp \
check_state.cpp \
client_msgs.cpp \
client_state.cpp \
client_types.cpp \
cs_account.cpp \
cs_apps.cpp \
cs_benchmark.cpp \
cs_cmdline.cpp \
cs_data.cpp \
cs_files.cpp \
cs_prefs.cpp \
cs_scheduler.cpp \
cs_statefile.cpp \
cs_trickle.cpp \
dhrystone.cpp \
dhrystone2.cpp \
file_names.cpp \
file_xfer.cpp \
gui_http.cpp \
gui_rpc_server.cpp \
gui_rpc_server_ops.cpp \
hostinfo_linux.cpp \
hostinfo_network.cpp \
hostinfo_unix.cpp \
http_curl.cpp \
log_flags.cpp \
main.cpp \
net_stats.cpp \
net_xfer_curl.cpp \
pers_file_xfer.cpp \
scheduler_op.cpp \
time_stats.cpp \
whetstone.cpp \
linux/user_idle_time_detection.c
boinc_client_DEPENDENCIES = $(LIBRSA)
boinc_client_CPPFLAGS = -D_USE_CURL -I../../curl-7.14.0/include -I $(srcdir)/win $(AM_CPPFLAGS) -O3
boinc_client_LDFLAGS = -static-libgcc
boinc_client_LDADD = -L/usr/local/ssl/lib -lssl -L../../curl-7.14.0/lib -lcurl -L../lib -lboinc $(RSA_LIBS) $(PTHREAD_LIBS)
#boinc_client_LDFLAGS = $(STATIC_FLAGS)
# the following don't do anything
cpu_benchmark_SOURCES = whetstone.cpp dhrystone.cpp
cpu_benchmark_CFLAGS = -O3 $(AM_CFLAGS)
all-local: client-bin
# make a hard link to the client name.
#CLIENT_BIN_FILENAME#: boinc_client
rm -f $#
#LN# $? $#
#STRIP# $#
## these source files need to be specified because no rule uses them.
EXTRA_DIST = *.h \
mac \
translation \
win
clean-local:
rm -f #CLIENT_BIN_FILENAME#
configure.ac
Cannot insert it here due Stackoverflow characters limit.
You should be getting a warning:
// This is wrong...
extern GDBusProxy* proxy = NULL;
warning: ‘proxy’ initialized and declared ‘extern’
extern GDBusProxy* proxy = NULL;
^~~~~
The extern storage class specifier basically means "this is defined somewhere else", but the = NULL is not really somewhere else.
Just like functions, with variables you should:
Declare them in the header file (compiled many times):
extern GDBusProxy *proxy;
This is a declaration and you can have as many declarations of a single object as you like (as long as they are all compatible).
Define them in the C file (compiled once):
GDBusProxy *proxy = NULL;
This is a definition and you can only have one definition in your entire project. So it cannot appear in a header file, unless that header file is only included by one C file.
This not the only way to do it. You can use the following declaration everywhere:
GDBusProxy *proxy;
This is a special case, it counts as a definition but you are allowed to have more than one in your program.
Note that = NULL is redundant. Global variables are zero-initialized by default.
In the case 1 you missed to define the variable in a source file, so its definition is missing
In the other cases having
GDBusProxy* proxy = NULL;
in a header file does not declare the variable but define it, so including the header file in several sources define it several times.
replace it by
extern GDBusProxy* proxy;
and define it in one of the source files

undefined reference to `TVersionCheck::TVersionCheck(int)

I want to use root cern libs in my Qt program. But I have problems with linker:
undefined reference to `TVersionCheck::TVersionCheck(int)
I don't know what's the reason. I did read another forum, but still can't understand the issue. Please, help me.
The .pro file contents:
QT += core
QT -= gui
CONFIG += c++11
TARGET = v_root_trees_2
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
INCLUDEPATH += "C:/root_v5.34.34/include"
LIBS += -L"C:/root_v5.34.34/lib" \
-lcomplexDict \
-ldequeDict \
-lfreetype \
-llibAfterImage \
-llibASImage \
-llibASImageGui \
-llibCint \
-llibCintex \
-llibCore \
-llibEG \
-llibEGPythia8 \
-llibEve \
-llibFitPanel \
-llibFoam \
-llibFTGL \
-llibFumili \
-llibGdml \
-llibGed \
-llibGenetic \
-llibGenVector \
-llibGeom \
-llibGeomBuilder \
-llibGeomPainter \
-llibGLEW \
-llibGpad \
-llibGraf \
-llibGraf3d \
-llibGui \
-llibGuiBld \
-llibGuiHtml \
-llibGviz3d \
-llibHist \
-llibHistPainter \
-llibHtml \
-llibMathCore \
-llibMathMore \
-llibMatrix \
-llibMinuit \
-llibMinuit2 \
-llibMLP \
-llibNet \
-llibPhysics \
-llibPostscript \
-llibProof \
-llibProofDraw \
-llibProofPlayer \
-llibPyROOT \
-llibQuadp \
-llibRecorder \
-llibReflex \
-llibReflexDict \
-llibRGL \
-llibRHTTP \
-llibRint \
-llibRIO \
-llibRODBC \
-llibRooFit \
-llibRooFitCore \
-llibRooStats \
-llibRootAuth \
-llibSessionViewer \
-llibSmatrix \
-llibSpectrum \
-llibSpectrumPainter \
-llibSPlot \
-llibSQLIO \
-llibTable \
-llibThread \
-llibTMVA \
-llibTree \
-llibTreePlayer \
-llibTreeViewer \
-llibUnuran \
-llibVMC \
-llibWin32gdk \
-llibXMLIO \
-llistDict \
-lmap2Dict \
-lmapDict \
-lmathtext \
-lmultimap2Dict \
-lmultimapDict \
-lmultisetDict \
-lsetDict \
-lvectorDict
main.cpp file:
#include <QCoreApplication>
#include "TMultiGraph.h" // problem if add this line
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
return a.exec();
}
I don't know what is wrong. I added all .lib files.
The paths C:/root_v5.34.34/lib and C:/root_v5.34.34/include are correct and do exist. Changing paths I see cannot find ... error.
So, the paths are correct.
I checked the similar code in VS2013 and don't see any errors.
But I write a lot of code in Qt and can't change IDE.
I understand, that some link causes the error, but can't find it.
Some libraries in your project are included incorrectly. e.g. -llibAfterImage -llibASImage -llibASImageGui
you should write -lAfterImage -lASImage -lASImageGui and so on...
When i corrected your .pro file, build succeeded.
Possibly one of that incorrectly included libraries contains implementation of TVersionCheck::TVersionCheck(int)
I was struggling for this problem recently. It's because that ROOT under windows is 32bit, and you need to check the MSCV2015 32bit while reinstalling Qt...

Adding Makefile options into qtcreator project

I have a project made in qtcreator. The project in itself isn't very important for the question. I would like to add a project called PowerWatershed, the sources are available here:
PowerWatershed
Unfortunately, adding all the files to the .pro file give me an error when compiling, when making the "make" command with the Makefile of the PowerWatershed project works.
The makefile of the project is:
# Camille Couprie
# october 2009
OBJDIR = objects
PINKDIR = PINK
CSDIR = CSparse
ARGV = argv
PWSRC = src
VPATH = ${PINKDIR}:${CSDIR}:${ARGV}
CSINCLUDE = -I${CSDIR}/Include
PINKINCLUDE = -I${PINKDIR}
ARGVINCLUDE = -I${ARGV}
PWINCLUDE = -Iinclude
INCL = ${CSINCLUDE} ${PINKINCLUDE} ${ARGVINCLUDE} ${PWINCLUDE}
OBJ= objects/larith.o \
objects/ccsort.o \
objects/cccodimage.o \
objects/gageodesic.o \
objects/mccodimage.o \
objects/mcimage.o \
objects/mcindic.o \
objects/mclifo.o \
objects/random_walker.o \
objects/lMSF.o \
objects/MSF_RW.o \
objects/mcrbt.o \
objects/union_find.o \
objects/image_toolbox.o \
objects/cs_lu.o \
objects/cs_lusol.o \
objects/cs_malloc.o \
objects/cs_util.o \
objects/cs_multiply.o \
objects/cs_compress.o \
objects/cs_lsolve.o \
objects/cs_scatter.o \
objects/cs_cumsum.o \
objects/cs_sqr.o \
objects/cs_ipvec.o \
objects/cs_amd.o \
objects/cs_permute.o \
objects/cs_transpose.o \
objects/cs_counts.o \
objects/cs_add.o \
objects/cs_etree.o \
objects/cs_leaf.o \
objects/cs_fkeep.o \
objects/cs_tdfs.o \
objects/cs_usolve.o \
objects/cs_spsolve.o \
objects/cs_post.o \
objects/cs_reach.o \
objects/cs_dfs.o \
objects/argv.o
# objects/cs_print.o \
# objects/cs_norm.o \
#
FLAGS = -g -Wall # -pg
CXX = g++
CC = gcc
OPTIMISE=-O4
WARNINGS=-Wall #-Werror
DEBUG=-g
CXXFLAGS= ${DEBUG} ${WARNINGS} ${OPTIMISE} -Wno-deprecated ${FLAGS}
CFLAGS = ${DEBUG} ${WARNINGS} ${OPTIMISE} ${FLAGS}
all: ${CS} ${OBJ}
${MAKE} powerwatsegm.exe
# make with the Intel compiler, a very good complement to gcc/g++
# much more efficient and with better diagnoses
intel:
${MAKE} CC=icc CXX=icpc all
debug:
${MAKE} OPTIMISE='' all
# remove the asserts and the debug information
production:
${MAKE} DEBUG='' FLAGS="-DNDEBUG" all
clean:
rm -f *.exe; rm -f *~; rm -f $(OBJ); #rm -f overlay*; rm -f mask*;
powerwatsegm.exe: ${PWSRC}/powerwatsegm.c $(OBJ)
$(CXX) $(CXXFLAGS) $(INCL) ${PWSRC}/powerwatsegm.c $(OBJ) -o powerwatsegm.exe
$(OBJDIR)/%.o: ${PWSRC}/%.c
$(CXX) $(CXXFLAGS) ${INCL} -c $< -o $#
$(OBJDIR)/%.o: ${CSDIR}/Source/%.c ${CSDIR}/Include/cs.h
$(CC) $(CFLAGS) ${CSINCLUDE} -c $< -o $#
$(OBJDIR)/%.o: ${PINKDIR}/%.c
$(CXX) $(CXXFLAGS) ${PINKINCLUDE} -c $< -o $#
$(OBJDIR)/argv.o: ${ARGV}/argv.c ${ARGV}/argv.h ${ARGV}/argv_loc.h
$(CC) $(CCFLAGS) ${ARGVINCLUDE} -c $< -o $#
$(OBJDIR)/lMSF.o: ${PWSRC}/lMSF.c ${PINKDIR}/mcimage.h ${PINKDIR}/mccodimage.h
$(CXX) $(CFLAGS) ${PINKINCLUDE} ${PWINCLUDE} -c ${PWSRC}/lMSF.c -o $#
I would like to add th propoer option to my .pro file to make the compilation work. At the moment, my pro file looks like
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = Power
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp \
PW_1.0.1/argv/argv.c \
PW_1.0.1/CSparse/Source/cs_add.c \
PW_1.0.1/CSparse/Source/cs_amd.c \
PW_1.0.1/CSparse/Source/cs_chol.c \
PW_1.0.1/CSparse/Source/cs_cholsol.c \
PW_1.0.1/CSparse/Source/cs_compress.c \
PW_1.0.1/CSparse/Source/cs_counts.c \
PW_1.0.1/CSparse/Source/cs_cumsum.c \
PW_1.0.1/CSparse/Source/cs_dfs.c \
PW_1.0.1/CSparse/Source/cs_etree.c \
PW_1.0.1/CSparse/Source/cs_fkeep.c \
PW_1.0.1/CSparse/Source/cs_ipvec.c \
PW_1.0.1/CSparse/Source/cs_leaf.c \
PW_1.0.1/CSparse/Source/cs_lsolve.c \
PW_1.0.1/CSparse/Source/cs_lu.c \
PW_1.0.1/CSparse/Source/cs_lusol.c \
PW_1.0.1/CSparse/Source/cs_malloc.c \
PW_1.0.1/CSparse/Source/cs_multiply.c \
PW_1.0.1/CSparse/Source/cs_norm.c \
PW_1.0.1/CSparse/Source/cs_permute.c \
PW_1.0.1/CSparse/Source/cs_post.c \
PW_1.0.1/CSparse/Source/cs_print.c \
PW_1.0.1/CSparse/Source/cs_reach.c \
PW_1.0.1/CSparse/Source/cs_scatter.c \
PW_1.0.1/CSparse/Source/cs_spsolve.c \
PW_1.0.1/CSparse/Source/cs_sqr.c \
PW_1.0.1/CSparse/Source/cs_tdfs.c \
PW_1.0.1/CSparse/Source/cs_transpose.c \
PW_1.0.1/CSparse/Source/cs_usolve.c \
PW_1.0.1/CSparse/Source/cs_util.c \
PW_1.0.1/PINK/gageodesic.c \
PW_1.0.1/PINK/larith.c \
PW_1.0.1/PINK/lMSF.c \
PW_1.0.1/PINK/mccodimage.c \
PW_1.0.1/PINK/mcimage.c \
PW_1.0.1/PINK/mcindic.c \
PW_1.0.1/PINK/mclifo.c \
PW_1.0.1/PINK/mcrbt.c \
PW_1.0.1/src/cccodimage.c \
PW_1.0.1/src/ccsort.c \
PW_1.0.1/src/gageodesic.c \
PW_1.0.1/src/image_toolbox.c \
PW_1.0.1/src/lMSF.c \
PW_1.0.1/src/MSF_RW.c \
PW_1.0.1/src/powerwatsegm.c \
PW_1.0.1/src/random_walker.c \
PW_1.0.1/src/union_find.c
HEADERS += mainwindow.h \
PW_1.0.1/argv/argv.h \
PW_1.0.1/argv/argv_loc.h \
PW_1.0.1/argv/compat.h \
PW_1.0.1/argv/conf.h \
PW_1.0.1/CSparse/Include/cs.h \
PW_1.0.1/include/cccodimage.h \
PW_1.0.1/include/ccsort.h \
PW_1.0.1/include/gageodesic.h \
PW_1.0.1/include/image_toolbox.h \
PW_1.0.1/include/lMSF.h \
PW_1.0.1/include/MSF_RW.h \
PW_1.0.1/include/powerwatsegm.h \
PW_1.0.1/include/random_walker.h \
PW_1.0.1/include/union_find.h \
PW_1.0.1/PINK/larith.h \
PW_1.0.1/PINK/mccodimage.h \
PW_1.0.1/PINK/mcimage.h \
PW_1.0.1/PINK/mcindic.h \
PW_1.0.1/PINK/mclifo.h \
PW_1.0.1/PINK/mcrbt.h \
PW_1.0.1/PINK/mcutil.h
FORMS += mainwindow.ui
And I have the error:
/home/iznogood/Documents/Power/PW_1.0.1/src/gageodesic.c:44: erreur : mccodimage.h: No such file or directory
#include <mccodimage.h>
^
I think this is a matter of path, which are mentionned in the Makefile with:
OBJDIR = objects
PINKDIR = PINK
CSDIR = CSparse
ARGV = argv
PWSRC = src
VPATH = ${PINKDIR}:${CSDIR}:${ARGV}
But I can't manage to add them to the .pro file.
The relevant qmake variable is INCLUDEPATH.
So, for the following from the original makefile:
CSINCLUDE = -I${CSDIR}/Include
PINKINCLUDE = -I${PINKDIR}
ARGVINCLUDE = -I${ARGV}
PWINCLUDE = -Iinclude
INCL = ${CSINCLUDE} ${PINKINCLUDE} ${ARGVINCLUDE} ${PWINCLUDE}
would be something like this:
INCLUDEPATH += ${CSDIR}/Include \
${PINKDIR} \
${ARGV} \
include
This is documented in the QMake manual in the reference pages.

When trying to build a project in Qt Creator, I get the error:'ui_texo.h' file not found #include "ui_texo.h"

My project file qt.pro is located in the same folder as a .ui file called texo.ui. From what I have read, it seems like a file ui_texo.h should be automatically generated when I try to build the project but I'm not positive. I am a Qt beginner and am quite lost. I had a similar problem initially with a file qgraphicsview.h, which I fixed by using finder to locate the file and then pasting it into the same file that qt.pro is in. Unfortunately, I can't locate a ui_texo.h file anywhere on my computer. Thanks in advance for any help, and let me know if you have any questions or if I haven't been clear!
The contents of qt.pro are:
QT += core gui
TARGET = qt
TEMPLATE = app
HEADERS += \
TexoView.h \
TexoDemo.h \
stdafx.h \
TexoViewImg.h \
SOURCES += \
TexoView.cpp \
TexoDemo.cpp \
StdAfx.cpp \
main.cpp \
TexoViewImg.cpp
FORMS += \
texo.ui
RESOURCES += \
texo.qrc \
texo.qrc
OTHER_FILES += \
res/u.ico \
res/stop.png \
res/run.png \
res/init.png
INCLUDEPATH += ../../inc/
LIBS += -L"../../lib/" -ltexo
LIBS += -L"../../../bin/" -ltexo
`
and the contents of makefile are:
Makefile: qt.pro ../../../Qt/5.3/clang_64/mkspecs/macx-clang/qmake.conf ../../../Qt/5.3/clang_64/mkspecs/features/spec_pre.prf \
../../../Qt/5.3/clang_64/mkspecs/qdevice.pri \
../../../Qt/5.3/clang_64/mkspecs/features/device_config.prf \
../../../Qt/5.3/clang_64/mkspecs/common/shell-unix.conf \
../../../Qt/5.3/clang_64/mkspecs/common/unix.conf \
../../../Qt/5.3/clang_64/mkspecs/common/mac.conf \
../../../Qt/5.3/clang_64/mkspecs/common/macx.conf \
../../../Qt/5.3/clang_64/mkspecs/common/gcc-base.conf \
../../../Qt/5.3/clang_64/mkspecs/common/gcc-base-mac.conf \
../../../Qt/5.3/clang_64/mkspecs/common/clang.conf \
../../../Qt/5.3/clang_64/mkspecs/common/clang-mac.conf \
../../../Qt/5.3/clang_64/mkspecs/qconfig.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_bluetooth.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_bluetooth_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_bootstrap_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_clucene_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_concurrent.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_concurrent_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_core.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_core_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_dbus.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_dbus_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_declarative.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_declarative_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_designer.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_designer_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_designercomponents_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_enginio.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_enginio_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_gui.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_gui_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_help.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_help_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_macextras.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_macextras_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_multimedia.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_multimedia_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_multimediawidgets.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_multimediawidgets_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_network.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_network_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_nfc.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_nfc_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_opengl.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_opengl_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_openglextensions.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_openglextensions_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_platformsupport_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_positioning.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_positioning_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_printsupport.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_printsupport_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_qml.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_qml_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_qmldevtools_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_qmltest.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_qmltest_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_qtmultimediaquicktools_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_quick.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_quick_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_quickparticles_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_quickwidgets.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_quickwidgets_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_script.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_script_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_scripttools.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_scripttools_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_sensors.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_sensors_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_serialport.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_serialport_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_sql.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_sql_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_svg.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_svg_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_testlib.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_testlib_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_uitools.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_uitools_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_webkit.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_webkit_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_webkitwidgets.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_webkitwidgets_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_websockets.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_websockets_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_widgets.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_widgets_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_xml.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_xml_private.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_xmlpatterns.pri \
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_xmlpatterns_private.pri \
../../../Qt/5.3/clang_64/mkspecs/features/qt_functions.prf \
../../../Qt/5.3/clang_64/mkspecs/features/qt_config.prf \
../../../Qt/5.3/clang_64/mkspecs/macx-clang/qmake.conf \
../../../Qt/5.3/clang_64/mkspecs/features/spec_post.prf \
../../../../.qmake.stash \
../../../Qt/5.3/clang_64/mkspecs/features/exclusive_builds.prf \
../../../Qt/5.3/clang_64/mkspecs/features/default_pre.prf \
../../../Qt/5.3/clang_64/mkspecs/features/mac/default_pre.prf \
../../../Qt/5.3/clang_64/mkspecs/features/resolve_config.prf \
../../../Qt/5.3/clang_64/mkspecs/features/default_post.prf \
../../../Qt/5.3/clang_64/mkspecs/features/mac/sdk.prf \
../../../Qt/5.3/clang_64/mkspecs/features/mac/default_post.prf \
../../../Qt/5.3/clang_64/mkspecs/features/mac/objective_c.prf \
../../../Qt/5.3/clang_64/mkspecs/features/warn_on.prf \
../../../Qt/5.3/clang_64/mkspecs/features/qt.prf \
../../../Qt/5.3/clang_64/mkspecs/features/resources.prf \
../../../Qt/5.3/clang_64/mkspecs/features/moc.prf \
../../../Qt/5.3/clang_64/mkspecs/features/unix/opengl.prf \
../../../Qt/5.3/clang_64/mkspecs/features/unix/thread.prf \
../../../Qt/5.3/clang_64/mkspecs/features/mac/rez.prf \
../../../Qt/5.3/clang_64/mkspecs/features/testcase_targets.prf \
../../../Qt/5.3/clang_64/mkspecs/features/exceptions.prf \
../../../Qt/5.3/clang_64/mkspecs/features/yacc.prf \
../../../Qt/5.3/clang_64/mkspecs/features/lex.prf \
qt.pro \
texo.qrc \
/Users/Mike/Desktop/Work/Qt/5.3/clang_64/lib/QtGui.framework/QtGui.prl \
/Users/Mike/Desktop/Work/Qt/5.3/clang_64/lib/QtCore.framework/QtCore.prl
$(QMAKE) -spec macx-clang CONFIG+=debug CONFIG+=x86_64 -o Makefile qt.pro
../../../Qt/5.3/clang_64/mkspecs/features/spec_pre.prf:
../../../Qt/5.3/clang_64/mkspecs/qdevice.pri:
../../../Qt/5.3/clang_64/mkspecs/features/device_config.prf:
../../../Qt/5.3/clang_64/mkspecs/common/shell-unix.conf:
../../../Qt/5.3/clang_64/mkspecs/common/unix.conf:
../../../Qt/5.3/clang_64/mkspecs/common/mac.conf:
../../../Qt/5.3/clang_64/mkspecs/common/macx.conf:
../../../Qt/5.3/clang_64/mkspecs/common/gcc-base.conf:
../../../Qt/5.3/clang_64/mkspecs/common/gcc-base-mac.conf:
../../../Qt/5.3/clang_64/mkspecs/common/clang.conf:
../../../Qt/5.3/clang_64/mkspecs/common/clang-mac.conf:
../../../Qt/5.3/clang_64/mkspecs/qconfig.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_bluetooth.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_bluetooth_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_bootstrap_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_clucene_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_concurrent.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_concurrent_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_core.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_core_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_dbus.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_dbus_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_declarative.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_declarative_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_designer.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_designer_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_designercomponents_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_enginio.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_enginio_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_gui.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_gui_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_help.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_help_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_macextras.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_macextras_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_multimedia.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_multimedia_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_multimediawidgets.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_multimediawidgets_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_network.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_network_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_nfc.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_nfc_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_opengl.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_opengl_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_openglextensions.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_openglextensions_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_platformsupport_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_positioning.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_positioning_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_printsupport.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_printsupport_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_qml.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_qml_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_qmldevtools_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_qmltest.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_qmltest_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_qtmultimediaquicktools_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_quick.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_quick_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_quickparticles_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_quickwidgets.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_quickwidgets_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_script.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_script_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_scripttools.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_scripttools_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_sensors.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_sensors_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_serialport.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_serialport_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_sql.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_sql_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_svg.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_svg_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_testlib.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_testlib_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_uitools.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_uitools_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_webkit.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_webkit_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_webkitwidgets.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_webkitwidgets_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_websockets.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_websockets_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_widgets.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_widgets_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_xml.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_xml_private.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_xmlpatterns.pri:
../../../Qt/5.3/clang_64/mkspecs/modules/qt_lib_xmlpatterns_private.pri:
../../../Qt/5.3/clang_64/mkspecs/features/qt_functions.prf:
../../../Qt/5.3/clang_64/mkspecs/features/qt_config.prf:
../../../Qt/5.3/clang_64/mkspecs/macx-clang/qmake.conf:
../../../Qt/5.3/clang_64/mkspecs/features/spec_post.prf:
../../../../.qmake.stash:
../../../Qt/5.3/clang_64/mkspecs/features/exclusive_builds.prf:
../../../Qt/5.3/clang_64/mkspecs/features/default_pre.prf:
../../../Qt/5.3/clang_64/mkspecs/features/mac/default_pre.prf:
../../../Qt/5.3/clang_64/mkspecs/features/resolve_config.prf:
../../../Qt/5.3/clang_64/mkspecs/features/default_post.prf:
../../../Qt/5.3/clang_64/mkspecs/features/mac/sdk.prf:
../../../Qt/5.3/clang_64/mkspecs/features/mac/default_post.prf:
../../../Qt/5.3/clang_64/mkspecs/features/mac/objective_c.prf:
../../../Qt/5.3/clang_64/mkspecs/features/warn_on.prf:
../../../Qt/5.3/clang_64/mkspecs/features/qt.prf:
../../../Qt/5.3/clang_64/mkspecs/features/resources.prf:
../../../Qt/5.3/clang_64/mkspecs/features/moc.prf:
../../../Qt/5.3/clang_64/mkspecs/features/unix/opengl.prf:
../../../Qt/5.3/clang_64/mkspecs/features/unix/thread.prf:
../../../Qt/5.3/clang_64/mkspecs/features/mac/rez.prf:
../../../Qt/5.3/clang_64/mkspecs/features/testcase_targets.prf:
../../../Qt/5.3/clang_64/mkspecs/features/exceptions.prf:
../../../Qt/5.3/clang_64/mkspecs/features/yacc.prf:
../../../Qt/5.3/clang_64/mkspecs/features/lex.prf:
qt.pro:
texo.qrc:
/Users/Mike/Desktop/Work/Qt/5.3/clang_64/lib/QtGui.framework/QtGui.prl:
/Users/Mike/Desktop/Work/Qt/5.3/clang_64/lib/QtCore.framework/QtCore.prl:
qmake: FORCE
#$(QMAKE) -spec macx-clang CONFIG+=debug CONFIG+=x86_64 -o Makefile qt.pro
qmake_all: FORCE
qt.app/Contents/PkgInfo:
#test -d qt.app/Contents || mkdir -p qt.app/Contents
#$(DEL_FILE) qt.app/Contents/PkgInfo
#echo "APPL????" >qt.app/Contents/PkgInfo
qt.app/Contents/Resources/empty.lproj:
#test -d qt.app/Contents/Resources || mkdir -p qt.app/Contents/Resources
#touch qt.app/Contents/Resources/empty.lproj
qt.app/Contents/Info.plist:
#test -d qt.app/Contents || mkdir -p qt.app/Contents
#$(DEL_FILE) qt.app/Contents/Info.plist
#sed -e "s,#SHORT_VERSION#,1.0,g" -e "s,#TYPEINFO#,????,g" -e "s,#ICON#,,g" -e "s,#BUNDLEIDENTIFIER#,sdf.qt,g" -e "s,#EXECUTABLE#,qt,g" -e "s,#TYPEINFO#,????,g" ../../../Qt/5.3/clang_64/mkspecs/macx-clang/Info.plist.app >qt.app/Contents/Info.plist
dist:
#test -d .tmp/qt1.0.0 || mkdir -p .tmp/qt1.0.0
$(COPY_FILE) --parents $(DIST) .tmp/qt1.0.0/ && $(COPY_FILE) --parents texo.qrc texo.qrc .tmp/qt1.0.0/ && $(COPY_FILE) --parents TexoView.h TexoDemo.h stdafx.h TexoViewImg.h .tmp/qt1.0.0/ && $(COPY_FILE) --parents TexoView.cpp TexoDemo.cpp StdAfx.cpp main.cpp TexoViewImg.cpp .tmp/qt1.0.0/ && (cd `dirname .tmp/qt1.0.0` && $(TAR) qt1.0.0.tar qt1.0.0 && $(COMPRESS) qt1.0.0.tar) && $(MOVE) `dirname .tmp/qt1.0.0`/qt1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/qt1.0.0
clean:compiler_clean
-$(DEL_FILE) $(OBJECTS)
-$(DEL_FILE) *~ core *.core
distclean: clean
-$(DEL_FILE) -r qt.app
-$(DEL_FILE) Makefile
####### Sub-libraries
mocclean: compiler_moc_header_clean compiler_moc_source_clean
mocables: compiler_moc_header_make_all compiler_moc_source_make_all
check: first
compiler_objective_c_make_all:
compiler_objective_c_clean:
compiler_rcc_make_all: qrc_texo.cpp qrc_texo.cpp
compiler_rcc_clean:
-$(DEL_FILE) qrc_texo.cpp qrc_texo.cpp
qrc_texo.cpp: texo.qrc \
res/stop.png \
res/u.ico \
res/run.png \
res/init.png
/Users/Mike/Desktop/Work/Qt/5.3/clang_64/bin/rcc -name texo texo.qrc -o qrc_texo.cpp
qrc_texo.cpp: texo.qrc \
res/stop.png \
res/u.ico \
res/run.png \
res/init.png
/Users/Mike/Desktop/Work/Qt/5.3/clang_64/bin/rcc -name texo texo.qrc -o qrc_texo.cpp
compiler_moc_header_make_all: moc_TexoDemo.cpp
compiler_moc_header_clean:
-$(DEL_FILE) moc_TexoDemo.cpp
moc_TexoDemo.cpp: TexoDemo.h
/Users/Mike/Desktop/Work/Qt/5.3/clang_64/bin/moc $(DEFINES) -D__APPLE__ -D__GNUC__=4 -I/Users/Mike/Desktop/Work/Qt/5.3/clang_64/mkspecs/macx-clang -I/Users/Mike/Desktop/Work/texo/demo/qt -I/Users/Mike/Desktop/Work/texo/inc -I/Users/Mike/Desktop/Work/Qt/5.3/clang_64/lib/QtGui.framework/Headers -I/Users/Mike/Desktop/Work/Qt/5.3/clang_64/lib/QtCore.framework/Headers -F/Users/Mike/Desktop/Work/Qt/5.3/clang_64/lib TexoDemo.h -o moc_TexoDemo.cpp
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_rez_source_make_all:
compiler_rez_source_clean:
compiler_yacc_decl_make_all:
compiler_yacc_decl_clean:
compiler_yacc_impl_make_all:
compiler_yacc_impl_clean:
compiler_lex_make_all:
compiler_lex_clean:
compiler_clean: compiler_rcc_clean compiler_moc_header_clean
####### Compile
TexoView.o: TexoView.cpp stdafx.h \
../../inc/texo_def.h \
../../inc/texo.h \
TexoView.h \
qgraphicsview.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o TexoView.o TexoView.cpp
TexoDemo.o: TexoDemo.cpp stdafx.h \
../../inc/texo_def.h \
../../inc/texo.h \
TexoDemo.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o TexoDemo.o TexoDemo.cpp
StdAfx.o: StdAfx.cpp stdafx.h \
../../inc/texo_def.h \
../../inc/texo.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o StdAfx.o StdAfx.cpp
main.o: main.cpp stdafx.h \
../../inc/texo_def.h \
../../inc/texo.h \
TexoDemo.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
TexoViewImg.o: TexoViewImg.cpp stdafx.h \
../../inc/texo_def.h \
../../inc/texo.h \
TexoViewImg.h \
qgraphicsview.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o TexoViewImg.o TexoViewImg.cpp
qrc_texo.o: qrc_texo.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qrc_texo.o qrc_texo.cpp
moc_TexoDemo.o: moc_TexoDemo.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_TexoDemo.o moc_TexoDemo.cpp
####### Install
install: FORCE
uninstall: FORCE
FORCE:
Make sure that the .ui file is referenced in the project file. Add this line to qt.pro if it's not there already:
FORMS = texo.ui
You Makefile doesn't contain any ui specific rules, indicating that it was not created from your .pro file, or at least not from this version of your .pro file. (Re-)running qmake might indeed help. You should be able to run qmake from Creator's "Build" menu.

compile QT and OpenCV together in Ubuntu using qmake

Im writing a OpenCV application and a QT GUI together and im having some issues compiling.
Some background information that might be useful; the OS is Ubuntu 13.10, the output of " qmake --version" is :QMake version 3.0 Using Qt version 5.0.2 in /usr/lib/x86_64-linux-gnu
The issues starts upon the appearance of one line of code, that being "Mat cvImage" where I declare a Mat object. The way im compiling is first "qmake -project" then "qmake" then i go into my .pro file and add "QT += widgets" and then I type "make", when i do this, i get the error
/usr/lib/x86_64-linux-gnu/qt5/bin/qmake -o Makefile gui2.pro
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/qt5 - I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -o main.o main.cpp
main.cpp: In function ‘int main(int, char**)’:
main.cpp:55:2: error: ‘Mat’ was not declared in this scope
Mat cvImage;
^
main.cpp:55:2: note: suggested alternative:
In file included from main.cpp:20:0:
/usr/local/include/opencv2/core/core.hpp:1683:18: note: ‘cv::Mat’
class CV_EXPORTS Mat
^
main.cpp:55:6: error: expected ‘;’ before ‘cvImage’
Mat cvImage;
^
make: *** [main.o] Error 1
To be honest, i have no idea what "In file included from main.cpp:20:0: /usr/local/include/opencv2/core/core.hpp:1683:10 note: 'cv :: Mat' " means. I included all the appropriate OpenCV libraries and I dont know how to interpret that line of error output. Below is my code
/*****************C++ Libraries******************/
#include <iostream>
/****************User Defined*******************/
#include "function.h"
#include "function.cpp"
/****************Libraries Needed for QT********/
#include <QObject>
#include <QApplication>
#include <QWidget>
#include <QGridLayout>
#include <QSpinBox>
#include <QLabel>
#include <QGraphicsScene>
#include<QGraphicsView>
#include <QGraphicsPixmapItem>
/************Libraries Needed For OpenCV*******/
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace std;
int main(int argc, char ** argv){
QApplication a(argc, argv);
/** some code that runs a gui ***/
Mat cvImage; // This is where the problem starts
window.show();
return a.exec();
}
I also looked into my Makefile and i dont see any paths or anything to OpenCV libraries so I tried adding them, it caused more problems.
This is the auto-generated Makefile(via the qmake command)
#############################################################################
# Makefile for building: gui2
# Generated by qmake (3.0) (Qt 5.0.2) on: Mon Jan 27 12:24:52 2014
# Project: gui2.pro
# Template: app
# Command: /usr/lib/x86_64-linux-gnu/qt5/bin/qmake -o Makefile gui2.pro
#############################################################################
MAKEFILE = Makefile
####### Compiler, tools and options
CC = gcc
CXX = g++
DEFINES = -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
CFLAGS = -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIE $(DEFINES)
CXXFLAGS = -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIE $(DEFINES)
INCPATH = -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I.
LINK = g++
LFLAGS = -m64 -Wl,-O1
LIBS = $(SUBLIBS) -L/usr/X11R6/lib64 -lQt5Widgets -L/usr/lib/x86_64-linux-gnu -lQt5Gui -lQt5Core -lGL -lpthread
AR = ar cqs
RANLIB =
QMAKE = /usr/lib/x86_64-linux-gnu/qt5/bin/qmake
TAR = tar -cf
COMPRESS = gzip -9f
COPY = cp -f
SED = sed
COPY_FILE = cp -f
COPY_DIR = cp -f -R
STRIP = strip
INSTALL_FILE = install -m 644 -p
INSTALL_DIR = $(COPY_DIR)
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE = rm -f
SYMLINK = ln -f -s
DEL_DIR = rmdir
MOVE = mv -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
####### Output directory
OBJECTS_DIR = ./
####### Files
SOURCES = main.cpp moc_function.cpp
OBJECTS = main.o \
moc_function.o
DIST = /usr/share/qt5/mkspecs/features/spec_pre.prf \
/usr/share/qt5/mkspecs/common/shell-unix.conf \
/usr/share/qt5/mkspecs/common/unix.conf \
/usr/share/qt5/mkspecs/common/linux.conf \
/usr/share/qt5/mkspecs/common/gcc-base.conf \
/usr/share/qt5/mkspecs/common/gcc-base-unix.conf \
/usr/share/qt5/mkspecs/common/g++-base.conf \
/usr/share/qt5/mkspecs/common/g++-unix.conf \
/usr/share/qt5/mkspecs/qconfig.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_3d.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_3dquick.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_bootstrap.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_clucene.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_concurrent.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_core.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_dbus.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_designer.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_designercomponents.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_gui.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_help.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_location.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_multimedia.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_multimediawidgets.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_network.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_opengl.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_platformsupport.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_printsupport.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_qml.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_qmldevtools.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_qmltest.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_qtmultimediaquicktools.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_quick.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_quickparticles.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_script.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_scripttools.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_sensors.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_sql.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_svg.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_testlib.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_uitools.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_v8.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_webkit.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_webkitwidgets.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_widgets.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_xml.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_xmlpatterns.pri \
/usr/share/qt5/mkspecs/features/qt_functions.prf \
/usr/share/qt5/mkspecs/features/qt_config.prf \
/usr/share/qt5/mkspecs/linux-g++-64/qmake.conf \
/usr/share/qt5/mkspecs/features/spec_post.prf \
/usr/share/qt5/mkspecs/features/exclusive_builds.prf \
/usr/share/qt5/mkspecs/features/default_pre.prf \
/usr/share/qt5/mkspecs/features/unix/default_pre.prf \
/usr/share/qt5/mkspecs/features/resolve_config.prf \
/usr/share/qt5/mkspecs/features/default_post.prf \
/usr/share/qt5/mkspecs/features/unix/gdb_dwarf_index.prf \
/usr/share/qt5/mkspecs/features/warn_on.prf \
/usr/share/qt5/mkspecs/features/qt.prf \
/usr/share/qt5/mkspecs/features/resources.prf \
/usr/share/qt5/mkspecs/features/moc.prf \
/usr/share/qt5/mkspecs/features/unix/opengl.prf \
/usr/share/qt5/mkspecs/features/uic.prf \
/usr/share/qt5/mkspecs/features/unix/thread.prf \
/usr/share/qt5/mkspecs/features/wayland-scanner.prf \
/usr/share/qt5/mkspecs/features/testcase_targets.prf \
/usr/share/qt5/mkspecs/features/exceptions.prf \
/usr/share/qt5/mkspecs/features/yacc.prf \
/usr/share/qt5/mkspecs/features/lex.prf \
gui2.pro \
gui2.pro
QMAKE_TARGET = gui2
DESTDIR =
TARGET = gui2
first: all
####### Implicit rules
.SUFFIXES: .o .c .cpp .cc .cxx .C
.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$#" "$<"
.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$#" "$<"
.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$#" "$<"
.C.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$#" "$<"
.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o "$#" "$<"
####### Build rules
all: Makefile $(TARGET)
$(TARGET): $(OBJECTS)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
Makefile: gui2.pro /usr/share/qt5/mkspecs/linux-g++-64/qmake.conf /usr/share/qt5/mkspecs/features/spec_pre.prf \
/usr/share/qt5/mkspecs/common/shell-unix.conf \
/usr/share/qt5/mkspecs/common/unix.conf \
/usr/share/qt5/mkspecs/common/linux.conf \
/usr/share/qt5/mkspecs/common/gcc-base.conf \
/usr/share/qt5/mkspecs/common/gcc-base-unix.conf \
/usr/share/qt5/mkspecs/common/g++-base.conf \
/usr/share/qt5/mkspecs/common/g++-unix.conf \
/usr/share/qt5/mkspecs/qconfig.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_3d.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_3dquick.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_bootstrap.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_clucene.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_concurrent.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_core.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_dbus.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_designer.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_designercomponents.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_gui.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_help.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_location.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_multimedia.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_multimediawidgets.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_network.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_opengl.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_platformsupport.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_printsupport.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_qml.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_qmldevtools.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_qmltest.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_qtmultimediaquicktools.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_quick.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_quickparticles.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_script.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_scripttools.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_sensors.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_sql.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_svg.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_testlib.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_uitools.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_v8.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_webkit.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_webkitwidgets.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_widgets.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_xml.pri \
/usr/share/qt5/mkspecs/modules/qt_lib_xmlpatterns.pri \
/usr/share/qt5/mkspecs/features/qt_functions.prf \
/usr/share/qt5/mkspecs/features/qt_config.prf \
/usr/share/qt5/mkspecs/linux-g++-64/qmake.conf \
/usr/share/qt5/mkspecs/features/spec_post.prf \
/usr/share/qt5/mkspecs/features/exclusive_builds.prf \
/usr/share/qt5/mkspecs/features/default_pre.prf \
/usr/share/qt5/mkspecs/features/unix/default_pre.prf \
/usr/share/qt5/mkspecs/features/resolve_config.prf \
/usr/share/qt5/mkspecs/features/default_post.prf \
/usr/share/qt5/mkspecs/features/unix/gdb_dwarf_index.prf \
/usr/share/qt5/mkspecs/features/warn_on.prf \
/usr/share/qt5/mkspecs/features/qt.prf \
/usr/share/qt5/mkspecs/features/resources.prf \
/usr/share/qt5/mkspecs/features/moc.prf \
/usr/share/qt5/mkspecs/features/unix/opengl.prf \
/usr/share/qt5/mkspecs/features/uic.prf \
/usr/share/qt5/mkspecs/features/unix/thread.prf \
/usr/share/qt5/mkspecs/features/wayland-scanner.prf \
/usr/share/qt5/mkspecs/features/testcase_targets.prf \
/usr/share/qt5/mkspecs/features/exceptions.prf \
/usr/share/qt5/mkspecs/features/yacc.prf \
/usr/share/qt5/mkspecs/features/lex.prf \
gui2.pro \
/usr/lib/x86_64-linux-gnu/libQt5Widgets.prl \
/usr/lib/x86_64-linux-gnu/libQt5Gui.prl \
/usr/lib/x86_64-linux-gnu/libQt5Core.prl
$(QMAKE) -o Makefile gui2.pro
/usr/share/qt5/mkspecs/features/spec_pre.prf:
/usr/share/qt5/mkspecs/common/shell-unix.conf:
/usr/share/qt5/mkspecs/common/unix.conf:
/usr/share/qt5/mkspecs/common/linux.conf:
/usr/share/qt5/mkspecs/common/gcc-base.conf:
/usr/share/qt5/mkspecs/common/gcc-base-unix.conf:
/usr/share/qt5/mkspecs/common/g++-base.conf:
/usr/share/qt5/mkspecs/common/g++-unix.conf:
/usr/share/qt5/mkspecs/qconfig.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_3d.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_3dquick.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_bootstrap.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_clucene.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_concurrent.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_core.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_dbus.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_designer.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_designercomponents.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_gui.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_help.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_location.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_multimedia.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_multimediawidgets.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_network.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_opengl.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_platformsupport.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_printsupport.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_qml.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_qmldevtools.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_qmltest.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_qtmultimediaquicktools.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_quick.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_quickparticles.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_script.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_scripttools.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_sensors.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_sql.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_svg.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_testlib.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_uitools.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_v8.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_webkit.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_webkitwidgets.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_widgets.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_xml.pri:
/usr/share/qt5/mkspecs/modules/qt_lib_xmlpatterns.pri:
/usr/share/qt5/mkspecs/features/qt_functions.prf:
/usr/share/qt5/mkspecs/features/qt_config.prf:
/usr/share/qt5/mkspecs/linux-g++-64/qmake.conf:
/usr/share/qt5/mkspecs/features/spec_post.prf:
/usr/share/qt5/mkspecs/features/exclusive_builds.prf:
/usr/share/qt5/mkspecs/features/default_pre.prf:
/usr/share/qt5/mkspecs/features/unix/default_pre.prf:
/usr/share/qt5/mkspecs/features/resolve_config.prf:
/usr/share/qt5/mkspecs/features/default_post.prf:
/usr/share/qt5/mkspecs/features/unix/gdb_dwarf_index.prf:
/usr/share/qt5/mkspecs/features/warn_on.prf:
/usr/share/qt5/mkspecs/features/qt.prf:
/usr/share/qt5/mkspecs/features/resources.prf:
/usr/share/qt5/mkspecs/features/moc.prf:
/usr/share/qt5/mkspecs/features/unix/opengl.prf:
/usr/share/qt5/mkspecs/features/uic.prf:
/usr/share/qt5/mkspecs/features/unix/thread.prf:
/usr/share/qt5/mkspecs/features/wayland-scanner.prf:
/usr/share/qt5/mkspecs/features/testcase_targets.prf:
/usr/share/qt5/mkspecs/features/exceptions.prf:
/usr/share/qt5/mkspecs/features/yacc.prf:
/usr/share/qt5/mkspecs/features/lex.prf:
gui2.pro:
/usr/lib/x86_64-linux-gnu/libQt5Widgets.prl:
/usr/lib/x86_64-linux-gnu/libQt5Gui.prl:
/usr/lib/x86_64-linux-gnu/libQt5Core.prl:
qmake: FORCE
#$(QMAKE) -o Makefile gui2.pro
qmake_all: FORCE
dist:
#test -d .tmp/gui21.0.0 || mkdir -p .tmp/gui21.0.0
$(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/gui21.0.0/ && $(COPY_FILE) --parents function.h hide/convertImage.h function.cpp .tmp/gui21.0.0/ && $(COPY_FILE) --parents main.cpp .tmp/gui21.0.0/ && (cd `dirname .tmp/gui21.0.0` && $(TAR) gui21.0.0.tar gui21.0.0 && $(COMPRESS) gui21.0.0.tar) && $(MOVE) `dirname .tmp/gui21.0.0`/gui21.0.0.tar.gz . && $(DEL_FILE) -r .tmp/gui21.0.0
clean:compiler_clean
-$(DEL_FILE) $(OBJECTS)
-$(DEL_FILE) *~ core *.core
####### Sub-libraries
distclean: clean
-$(DEL_FILE) $(TARGET)
-$(DEL_FILE) Makefile
mocclean: compiler_moc_header_clean compiler_moc_source_clean
mocables: compiler_moc_header_make_all compiler_moc_source_make_all
check: first
compiler_rcc_make_all:
compiler_rcc_clean:
compiler_wayland-server-header_make_all:
compiler_wayland-server-header_clean:
compiler_wayland-client-header_make_all:
compiler_wayland-client-header_clean:
compiler_moc_header_make_all: moc_function.cpp
compiler_moc_header_clean:
-$(DEL_FILE) moc_function.cpp
moc_function.cpp: /usr/include/qt5/QtCore/QObject \
/usr/include/qt5/QtCore/qobject.h \
/usr/include/qt5/QtCore/qobjectdefs.h \
/usr/include/qt5/QtCore/qnamespace.h \
/usr/include/qt5/QtCore/qglobal.h \
/usr/include/qt5/QtCore/qconfig.h \
/usr/include/qt5/QtCore/qfeatures.h \
/usr/include/qt5/QtCore/qsystemdetection.h \
/usr/include/qt5/QtCore/qcompilerdetection.h \
/usr/include/qt5/QtCore/qprocessordetection.h \
/usr/include/qt5/QtCore/qlogging.h \
/usr/include/qt5/QtCore/qflags.h \
/usr/include/qt5/QtCore/qtypeinfo.h \
/usr/include/qt5/QtCore/qtypetraits.h \
/usr/include/qt5/QtCore/qsysinfo.h \
/usr/include/qt5/QtCore/qobjectdefs_impl.h \
/usr/include/qt5/QtCore/qstring.h \
/usr/include/qt5/QtCore/qchar.h \
/usr/include/qt5/QtCore/qbytearray.h \
/usr/include/qt5/QtCore/qrefcount.h \
/usr/include/qt5/QtCore/qatomic.h \
/usr/include/qt5/QtCore/qbasicatomic.h \
/usr/include/qt5/QtCore/qatomic_bootstrap.h \
/usr/include/qt5/QtCore/qgenericatomic.h \
/usr/include/qt5/QtCore/qatomic_msvc.h \
/usr/include/qt5/QtCore/qatomic_integrity.h \
/usr/include/qt5/QtCore/qoldbasicatomic.h \
/usr/include/qt5/QtCore/qatomic_vxworks.h \
/usr/include/qt5/QtCore/qatomic_power.h \
/usr/include/qt5/QtCore/qatomic_aarch64.h \
/usr/include/qt5/QtCore/qatomic_alpha.h \
/usr/include/qt5/QtCore/qatomic_armv7.h \
/usr/include/qt5/QtCore/qatomic_armv6.h \
/usr/include/qt5/QtCore/qatomic_armv5.h \
/usr/include/qt5/QtCore/qatomic_bfin.h \
/usr/include/qt5/QtCore/qatomic_ia64.h \
/usr/include/qt5/QtCore/qatomic_mips.h \
/usr/include/qt5/QtCore/qatomic_s390.h \
/usr/include/qt5/QtCore/qatomic_sh4a.h \
/usr/include/qt5/QtCore/qatomic_sparc.h \
/usr/include/qt5/QtCore/qatomic_x86.h \
/usr/include/qt5/QtCore/qatomic_cxx11.h \
/usr/include/qt5/QtCore/qatomic_gcc.h \
/usr/include/qt5/QtCore/qatomic_unix.h \
/usr/include/qt5/QtCore/qarraydata.h \
/usr/include/qt5/QtCore/qstringbuilder.h \
/usr/include/qt5/QtCore/qlist.h \
/usr/include/qt5/QtCore/qalgorithms.h \
/usr/include/qt5/QtCore/qiterator.h \
/usr/include/qt5/QtCore/qcoreevent.h \
/usr/include/qt5/QtCore/qscopedpointer.h \
/usr/include/qt5/QtCore/qmetatype.h \
/usr/include/qt5/QtCore/qvarlengtharray.h \
/usr/include/qt5/QtCore/qcontainerfwd.h \
/usr/include/qt5/QtCore/qisenum.h \
/usr/include/qt5/QtCore/qobject_impl.h \
function.h
/usr/lib/x86_64-linux-gnu/qt5/bin/moc $(DEFINES) $(INCPATH) function.h -o moc_function.cpp
compiler_wayland-code_make_all:
compiler_wayland-code_clean:
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_uic_make_all:
compiler_uic_clean:
compiler_yacc_decl_make_all:
compiler_yacc_decl_clean:
compiler_yacc_impl_make_all:
compiler_yacc_impl_clean:
compiler_lex_make_all:
compiler_lex_clean:
compiler_clean: compiler_moc_header_clean
####### Compile
main.o: main.cpp function.h \
/usr/include/qt5/QtCore/QObject \
/usr/include/qt5/QtCore/qobject.h \
/usr/include/qt5/QtCore/qobjectdefs.h \
/usr/include/qt5/QtCore/qnamespace.h \
/usr/include/qt5/QtCore/qglobal.h \
/usr/include/qt5/QtCore/qconfig.h \
/usr/include/qt5/QtCore/qfeatures.h \
/usr/include/qt5/QtCore/qsystemdetection.h \
/usr/include/qt5/QtCore/qcompilerdetection.h \
/usr/include/qt5/QtCore/qprocessordetection.h \
/usr/include/qt5/QtCore/qlogging.h \
/usr/include/qt5/QtCore/qflags.h \
/usr/include/qt5/QtCore/qtypeinfo.h \
/usr/include/qt5/QtCore/qtypetraits.h \
/usr/include/qt5/QtCore/qsysinfo.h \
/usr/include/qt5/QtCore/qobjectdefs_impl.h \
/usr/include/qt5/QtCore/qstring.h \
/usr/include/qt5/QtCore/qchar.h \
/usr/include/qt5/QtCore/qbytearray.h \
/usr/include/qt5/QtCore/qrefcount.h \
/usr/include/qt5/QtCore/qatomic.h \
/usr/include/qt5/QtCore/qbasicatomic.h \
/usr/include/qt5/QtCore/qatomic_bootstrap.h \
/usr/include/qt5/QtCore/qgenericatomic.h \
/usr/include/qt5/QtCore/qatomic_msvc.h \
/usr/include/qt5/QtCore/qatomic_integrity.h \
/usr/include/qt5/QtCore/qoldbasicatomic.h \
/usr/include/qt5/QtCore/qatomic_vxworks.h \
/usr/include/qt5/QtCore/qatomic_power.h \
/usr/include/qt5/QtCore/qatomic_aarch64.h \
/usr/include/qt5/QtCore/qatomic_alpha.h \
/usr/include/qt5/QtCore/qatomic_armv7.h \
/usr/include/qt5/QtCore/qatomic_armv6.h \
/usr/include/qt5/QtCore/qatomic_armv5.h \
/usr/include/qt5/QtCore/qatomic_bfin.h \
/usr/include/qt5/QtCore/qatomic_ia64.h \
/usr/include/qt5/QtCore/qatomic_mips.h \
/usr/include/qt5/QtCore/qatomic_s390.h \
/usr/include/qt5/QtCore/qatomic_sh4a.h \
/usr/include/qt5/QtCore/qatomic_sparc.h \
/usr/include/qt5/QtCore/qatomic_x86.h \
/usr/include/qt5/QtCore/qatomic_cxx11.h \
/usr/include/qt5/QtCore/qatomic_gcc.h \
/usr/include/qt5/QtCore/qatomic_unix.h \
/usr/include/qt5/QtCore/qarraydata.h \
/usr/include/qt5/QtCore/qstringbuilder.h \
/usr/include/qt5/QtCore/qlist.h \
/usr/include/qt5/QtCore/qalgorithms.h \
/usr/include/qt5/QtCore/qiterator.h \
/usr/include/qt5/QtCore/qcoreevent.h \
/usr/include/qt5/QtCore/qscopedpointer.h \
/usr/include/qt5/QtCore/qmetatype.h \
/usr/include/qt5/QtCore/qvarlengtharray.h \
/usr/include/qt5/QtCore/qcontainerfwd.h \
/usr/include/qt5/QtCore/qisenum.h \
/usr/include/qt5/QtCore/qobject_impl.h \
function.cpp \
/usr/include/qt5/QtWidgets/QApplication \
/usr/include/qt5/QtWidgets/qapplication.h \
/usr/include/qt5/QtCore/qcoreapplication.h \
/usr/include/qt5/QtCore/qeventloop.h \
/usr/include/qt5/QtGui/qwindowdefs.h \
/usr/include/qt5/QtGui/qwindowdefs_win.h \
/usr/include/qt5/QtCore/qpoint.h \
/usr/include/qt5/QtCore/qsize.h \
/usr/include/qt5/QtGui/qcursor.h \
/usr/include/qt5/QtWidgets/qdesktopwidget.h \
/usr/include/qt5/QtWidgets/qwidget.h \
/usr/include/qt5/QtCore/qmargins.h \
/usr/include/qt5/QtGui/qpaintdevice.h \
/usr/include/qt5/QtCore/qrect.h \
/usr/include/qt5/QtGui/qpalette.h \
/usr/include/qt5/QtGui/qcolor.h \
/usr/include/qt5/QtGui/qrgb.h \
/usr/include/qt5/QtCore/qstringlist.h \
/usr/include/qt5/QtCore/qdatastream.h \
/usr/include/qt5/QtCore/qiodevice.h \
/usr/include/qt5/QtCore/qpair.h \
/usr/include/qt5/QtCore/qregexp.h \
/usr/include/qt5/QtCore/qstringmatcher.h \
/usr/include/qt5/QtGui/qbrush.h \
/usr/include/qt5/QtCore/qvector.h \
/usr/include/qt5/QtGui/qmatrix.h \
/usr/include/qt5/QtGui/qpolygon.h \
/usr/include/qt5/QtGui/qregion.h \
/usr/include/qt5/QtCore/qline.h \
/usr/include/qt5/QtGui/qtransform.h \
/usr/include/qt5/QtGui/qpainterpath.h \
/usr/include/qt5/QtGui/qimage.h \
/usr/include/qt5/QtGui/qpixmap.h \
/usr/include/qt5/QtCore/qsharedpointer.h \
/usr/include/qt5/QtCore/qshareddata.h \
/usr/include/qt5/QtCore/qsharedpointer_impl.h \
/usr/include/qt5/QtCore/qhash.h \
/usr/include/qt5/QtGui/qfont.h \
/usr/include/qt5/QtGui/qfontmetrics.h \
/usr/include/qt5/QtGui/qfontinfo.h \
/usr/include/qt5/QtWidgets/qsizepolicy.h \
/usr/include/qt5/QtGui/qkeysequence.h \
/usr/include/qt5/QtGui/qevent.h \
/usr/include/qt5/QtCore/qvariant.h \
/usr/include/qt5/QtCore/qmap.h \
/usr/include/qt5/QtCore/qdebug.h \
/usr/include/qt5/QtCore/qtextstream.h \
/usr/include/qt5/QtCore/qlocale.h \
/usr/include/qt5/QtCore/qset.h \
/usr/include/qt5/QtCore/qcontiguouscache.h \
/usr/include/qt5/QtCore/qurl.h \
/usr/include/qt5/QtCore/qurlquery.h \
/usr/include/qt5/QtCore/qfile.h \
/usr/include/qt5/QtCore/qfiledevice.h \
/usr/include/qt5/QtGui/qvector2d.h \
/usr/include/qt5/QtGui/qtouchdevice.h \
/usr/include/qt5/QtGui/qguiapplication.h \
/usr/include/qt5/QtGui/qinputmethod.h \
/usr/include/qt5/QtWidgets/QWidget \
/usr/include/qt5/QtWidgets/QGridLayout \
/usr/include/qt5/QtWidgets/qgridlayout.h \
/usr/include/qt5/QtWidgets/qlayout.h \
/usr/include/qt5/QtWidgets/qlayoutitem.h \
/usr/include/qt5/QtWidgets/qboxlayout.h \
/usr/include/qt5/QtWidgets/QSpinBox \
/usr/include/qt5/QtWidgets/qspinbox.h \
/usr/include/qt5/QtWidgets/qabstractspinbox.h \
/usr/include/qt5/QtGui/qvalidator.h \
/usr/include/qt5/QtWidgets/QLabel \
/usr/include/qt5/QtWidgets/qlabel.h \
/usr/include/qt5/QtWidgets/qframe.h \
/usr/include/qt5/QtWidgets/QGraphicsScene \
/usr/include/qt5/QtWidgets/qgraphicsscene.h \
/usr/include/qt5/QtGui/qpen.h \
/usr/include/qt5/QtWidgets/QGraphicsView \
/usr/include/qt5/QtWidgets/qgraphicsview.h \
/usr/include/qt5/QtGui/qpainter.h \
/usr/include/qt5/QtGui/qtextoption.h \
/usr/include/qt5/QtWidgets/qscrollarea.h \
/usr/include/qt5/QtWidgets/qabstractscrollarea.h \
/usr/include/qt5/QtWidgets/QGraphicsPixmapItem \
/usr/include/qt5/QtWidgets/qgraphicsitem.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
moc_function.o: moc_function.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_function.o moc_function.cpp
####### Install
install: FORCE
uninstall: FORCE
FORCE:
I found out that all I had to do was include the libraries that i needed into "LIBS" in the Makefile. So this is the solution,at the end of LIBS in the Makefile or at the bottom add the line
`LIBS += pkg-config --libs opencv`
this line can actually be added anywhere in the "Compiler, tools and options" section of the Makefile(refer to the Makefile code posted in the original question).
Additionally, my lack of "namespace" was also an issue!
As clang is trying to tell you, you forgot the openCV namespace.
use either:
cv::Mat cvImage;
or
using namespace cv;
See the documentation.