0
私はこれらのパッケージエラーを長時間デバッグしようとしていました。 uint32_t
の場合、外部で変更できないtesseractパッケージのエラーですが、どうすれば解決できますか?
誰かがそれを見て、適切な解決策を提案することができます。助けてください。コンパイル後の組み込みパッケージエラー - C++
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
/usr/local/include/tesseract/host.h:35:9: error: 'uint8_t' does not name a type
typedef uint8_t uinT8;
^
/usr/local/include/tesseract/host.h:37:9: error: 'uint16_t' does not name a type
typedef uint16_t uinT16;
^
/usr/local/include/tesseract/host.h:39:9: error: 'uint32_t' does not name a type
typedef uint32_t uinT32;
^
/usr/local/include/tesseract/host.h:41:9: error: 'uint64_t' does not name a type
typedef uint64_t uinT64;
PlateDetector.cpp:100:23: error: 'const class QString' has no member named 'toAscii'
QString (filename.toAscii().data());
^
../../src/engine/PlateDetector.cpp:101:44: error: 'const class QString' has no member named 'toAscii'
m_videoCapture = VideoCapture(filename.toAscii().data());
^
../../src/engine/PlateDetector.cpp:134:47: error: 'class QString' has no member named 'toAscii'
strcpy(plate_str, str.toAscii().data());
^
これは、これらのエラーは、これがIT FOR PRO FILE IS
#include "PlateDetector.h"
#include<iostream>
#include<opencv2/core/core.hpp>
#include<opencv2/highgui/highgui.hpp>
#include<opencv2/opencv.hpp>
#include<opencv2/imgproc/imgproc.hpp>
#include<sstream>
#include<string>
#include<sys/types.h>
#include <stdio.h>
#include <QString>
#include <QDataStream>
#if defined __UINT32_MAX__ or UINT32_MAX
#include <inttypes.h>
#else
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned long uint32_t;
typedef unsigned long long uint64_t;
#endif
using namespace cv;
using namespace std;
QString (*filename);
PlateDetector *PlateDetector::m_instance = 0;
PlateDetector::PlateDetector()
{
m_plateThresh=85;
m_symbolMin=7;
m_symbolMax=9;
m_symbolCharacters=8;
m_plateGoodForOcr = 0;
m_detectionTime = 0.0;
m_thresh = 50;
m_xminmargin=0;
m_xmaxmargin=352;
m_yminmargin=0;
m_ymaxmargin=288;
m_cSrcStep=352;
m_count_step=0;
m_tAPI = new tesseract::TessBaseAPI();
PlateDetector* PlateDetector::getInstance()
{
if (m_instance == 0)
{
m_instance = new PlateDetector;
if (m_instance == 0)
{
printf("Memory Allocation Error when creating data structures\n");
}
}
return m_instance;
}
bool PlateDetector::plateDetect(const QString &filename)
{
m_detectFlag = true;
(filename.toAscii().data()); //error
m_videoCapture = VideoCapture(filename.toAscii().data()); //error
if(!m_videoCapture.isOpened())
{
return false;
}
を発生し、私のcppファイルです。
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS = \
main \
process \
gui \
#
QT += widgets
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x000000`
QT += core
QMAKE_CXX += -std=gnu++11
QMAKE_CXXFLAGS += -std=c++0x
QMAKE_CXXFLAGS += -std=c++11
INCLUDEPATH += -I/usr/local/include/tesseract -I/usr/local/include/leptonica
INCLUDEPATH += -I/usr/local/include/opencv
LIBS += -L/usr/local/lib -lopencv_stitching -lopencv_superres -lopencv_videostab\
-lopencv_photo -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired \
-lopencv_ccalib -lopencv_cvv -lopencv_dpm -lopencv_face -lopencv_freetype \
-lopencv_fuzzy -lopencv_hdf -lopencv_line_descriptor -lopencv_optflow -lopencv_reg\
-lopencv_rgbd -lopencv_saliency -lopencv_sfm -lopencv_stereo -lopencv_structured_light\
-lopencv_phase_unwrapping -lopencv_surface_matching -lopencv_tracking -lopencv_datasets\
-lopencv_text -lopencv_dnn -lopencv_plot -lopencv_ml -lopencv_xfeatures2d -lopencv_shape\
-lopencv_video -lopencv_ximgproc -lopencv_calib3d -lopencv_features2d -lopencv_highgui \
-lopencv_videoio -lopencv_flann -lopencv_xobjdetect -lopencv_imgcodecs -lopencv_objdetect\
-lopencv_xphoto -lopencv_imgproc -lopencv_core
LIBS += -L/usr/local/lib -ltesseract -lavformat -lavcodec -lavutil -lpthread
LIBS +=-L/usr/local/lib -llept
私はそれを追加しましたが、変更はありません。 – sophie