Hi guys,
I have some problem with external lib.. i try to include external lib into my project but it producing this C2871 error.
C:\Qt\OpenCVProject\20150505_23_Vid\mainwindow.h:9 : error: C2871: 'Videoman' : a namespace with this name does not exist
I already include the related .h file but its still showing the error.. What should i do? Where did i do wrong?
this is my .pro file
QT += core gui opengl xml
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = uEyeCam
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
win32:CONFIG(release, debug|release): LIBS += -LC:/OpenCV/VideoMan1.1/build/lib/ -lVideoMan
else:win32:CONFIG(debug, debug|release): LIBS += -LC:/OpenCV/VideoMan1.1/build/lib/ -lVideoMand
INCLUDEPATH += C:/OpenCV/VideoMan1.1/include
DEPENDPATH += C:/OpenCV/VideoMan1.1/include
QT += core gui opengl xml
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = uEyeCam
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
win32:CONFIG(release, debug|release): LIBS += -LC:/OpenCV/VideoMan1.1/build/lib/ -lVideoMan
else:win32:CONFIG(debug, debug|release): LIBS += -LC:/OpenCV/VideoMan1.1/build/lib/ -lVideoMand
INCLUDEPATH += C:/OpenCV/VideoMan1.1/include
DEPENDPATH += C:/OpenCV/VideoMan1.1/include
To copy to clipboard, switch view to plain text mode
my .h file
#include <QMainWindow>
#include "VideoManControl.h"
#include "VideoManInputFormat.h"
using namespace std;
using namespace Videoman;
namespace Ui {
class MainWindow;
}
{
Q_OBJECT
public:
explicit MainWindow
(QWidget *parent
= 0);
~MainWindow();
private slots:
void on_displayButton_clicked();
void openCamera();
private:
Ui::MainWindow *ui;
};
#include <QMainWindow>
#include "VideoManControl.h"
#include "VideoManInputFormat.h"
using namespace std;
using namespace Videoman;
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void on_displayButton_clicked();
void openCamera();
private:
Ui::MainWindow *ui;
};
To copy to clipboard, switch view to plain text mode
and VideoManControl.h file
#ifndef VIDEOMANCONTROL_H
#define VIDEOMANCONTROL_H
#ifdef WIN32
#ifdef VideoMan_EXPORTS
#define VIDEOMAN_API __declspec(dllexport)
#else
#define VIDEOMAN_API __declspec(dllimport)
#endif
#endif
#ifdef linux
#define VIDEOMAN_API
#endif
#include "VideoManInputFormat.h"
namespace VideoManPrivate
{
class VideoManControlPrivate;
class VideoManInputController;
};
namespace VideoMan
{
///////---------related code-------------///////
};
#endif
#ifndef VIDEOMANCONTROL_H
#define VIDEOMANCONTROL_H
#ifdef WIN32
#ifdef VideoMan_EXPORTS
#define VIDEOMAN_API __declspec(dllexport)
#else
#define VIDEOMAN_API __declspec(dllimport)
#endif
#endif
#ifdef linux
#define VIDEOMAN_API
#endif
#include "VideoManInputFormat.h"
namespace VideoManPrivate
{
class VideoManControlPrivate;
class VideoManInputController;
};
namespace VideoMan
{
///////---------related code-------------///////
};
#endif
To copy to clipboard, switch view to plain text mode
thanks in advance..
Bookmarks