Qt与Firmata图书馆

时间:2014-07-07 09:14:04

标签: c++ qt firmata

我想将Firmata库链接到qt

我该怎么办? 使用includepath? 我已经在我的电脑中更改环境变量以包含C中的arduino文件夹: 我已经在我的.pro文件中加入了像这样的

# OpenCv Configuration opencv-2.4.6
INCLUDEPATH += "D:\opencv\build\include"
INCLUDEPATH += "D:\opencv\build\include\opencv"
INCLUDEPATH += "C:\Program Files (x86)\Arduino"
INCLUDEPATH += "C:\Program Files (x86)\Arduino\hardware"
INCLUDEPATH += "C:\Program Files (x86)\Arduino\lib"
INCLUDEPATH += "C:\Program Files (x86)\Arduino\libraries"
INCLUDEPATH += "C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino\Arduino.h"
LIBS += "D:\opencv\install\lib\libopencv_calib3d246.dll.a"
LIBS += "D:\opencv\install\lib\libopencv_contrib246.dll.a"
LIBS += "D:\opencv\install\lib\libopencv_core246.dll.a"
LIBS += "D:\opencv\install\lib\libopencv_flann246.dll.a"
LIBS += "D:\opencv\install\lib\libopencv_highgui246.dll.a"
LIBS += "D:\opencv\install\lib\libopencv_imgproc246.dll.a"
LIBS += "D:\opencv\install\lib\libopencv_objdetect246.dll.a"
LIBS += "D:\opencv\install\lib\libopencv_features2d246.dll.a"
LIBS += "D:\opencv\install\lib\libopencv_legacy246.dll.a"
LIBS += "D:\opencv\install\lib\libopencv_ml246.dll.a"
#LIBS += "D:\opencv\install\lib\libopencv_ts246.dll.a"
LIBS += "D:\opencv\install\lib\libopencv_video246.dll.a"
我犯了一些错误吗?因为我的Boards.h中的Arduino.h说没有这样的文件目录

下面是boards.h文件:

#ifndef Firmata_Boards_h
#define Firmata_Boards_h

#include <inttypes.h>

#if defined(ARDUINO) && ARDUINO >= 100
#include <Arduino.h>    // for digitalRead, digitalWrite, etc
#else
#include "WProgram.h"
#endif

// Normally Servo.h must be included before Firmata.h (which then includes
// this file).  If Servo.h wasn't included, this allows the code to still
// compile, but without support for any Servos.  Hopefully that's what the
// user intended by not including Servo.h
#ifndef MAX_SERVOS
#define MAX_SERVOS 0
#endif

0 个答案:

没有答案