I am trying to use the Eyetribe SDK with Qt creator at the moment, but I'm having difficulties linking it with boost.
I am using Qt 4.8.4 and Qt Creator 2.4.1 (with MinGW compiler)
I use boost 1.52.
I added :
"gazeapi.h/cpp", "gazeapi_interfaces.h", "gazeapi_types.h", "gazeapi_observable.hpp", "gazeapi_parser.hpp/cpp" and "gazeapi_socket.hpp/cpp" to my project.
I created a 'MyGaze' class and filled it with the C++ exemple.
To build boost :
- I first added "C:/Qt/qtcreator-2.4.1/mingw/bin" to my PATH variable
- then opened a command prompt
- went to "C:/boost_1_52"
- typed "bootstrap.bat mingw"
- and then "b2 toolset=gcc build-type=complete stage" (this took a long time (about 2h))
In my .pro file I have added :
- Code: Select all
INCLUDEPATH += C:/boost_1_52
LIBS += -LC:/boost_1_52/stage/lib \
-lboost_system-mgw48-mt-1_52 \
-lboost_thread-mgw48-mt-1-52
#"libboost_system..." needs this library
LIBS += -LC:/windows_sdk/lib \
-lWS2_32
My main.cpp is very simple :
- Code: Select all
#include <QtCore/QCoreApplication>
#include "gazeapi.h"
#include "mygaze.h"
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
// MyGaze test;
return a.exec();
}
When I try to build my project I have a lot of 'undefined reference', there are two types of them :
- some with 'thread' in it like :
- Code: Select all
undefined reference to `_imp___ZN5boost6thread4joinEv'
undefined reference to `_imp___ZN5boost6thread12start_threadEv'
-some that looks like :
- Code: Select all
undefined reference to `boost::system::generic_category()'
undefined reference to `boost::system::system_category()'
I really do not see how to fix these errors