Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

reference to `int64` is ambiguous error with Dlib and OpenCV

Hello, im using OpenCV 4.1.1 and dlib 19.17 on a recognition project with Qt Creator IDE, when compiling the project using Qmake, i got an error like this :

`In file included from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/opencv/cv_image.h:7:0, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/recognition/ocr.h:23, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/detection/detection.h:15, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/detection/detection.cpp:19: /usr/local/include/opencv4/opencv2/core/core_c.h:2582:1: error: reference to ‘int64’ is ambiguous

CVAPI(int64) cvGetTickCount( void );

^

In file included from /usr/local/include/opencv4/opencv2/core/cvdef.h:165:0, from /usr/local/include/opencv4/opencv2/core.hpp:52, from /usr/local/include/opencv4/opencv2/opencv.hpp:52, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/detection/detection.cpp:8:

/usr/local/include/opencv4/opencv2/core/hal/interface.h:61:20: note: candidates are: typedef int64_t int64 typedef int64_t int64; ^~~~~

In file included from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/../matrix/../algs.h:115:0, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/../matrix/matrix_exp.h:6, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/../matrix/matrix.h:6, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/../matrix.h:6, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/tensor.h:8, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/dnn.h:12, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/recognition/ocr.h:17, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/detection/detection.h:15, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/detection/detection.cpp:19:

../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/../matrix/../uintn.h:27:23: note: typedef long long int dlib::int64 typedef long long int64; ^~~~~`

I am calling the GetTickCount that have int64 type, and dlib is also using that int64 type in 'uintn.h' header file. Is there any solution to fix this?

reference to `int64` is ambiguous error with Dlib and OpenCV

Hello, im using OpenCV 4.1.1 and dlib 19.17 on a recognition project with Qt Creator IDE, when compiling the project using Qmake, i got an error like this :

`In file included from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/opencv/cv_image.h:7:0, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/recognition/ocr.h:23, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/detection/detection.h:15, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/detection/detection.cpp:19: /usr/local/include/opencv4/opencv2/core/core_c.h:2582:1: error: reference to ‘int64’ is ambiguous

CVAPI(int64) cvGetTickCount( void );

^

In file included from /usr/local/include/opencv4/opencv2/core/cvdef.h:165:0, from /usr/local/include/opencv4/opencv2/core.hpp:52, from /usr/local/include/opencv4/opencv2/opencv.hpp:52, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/detection/detection.cpp:8:

/usr/local/include/opencv4/opencv2/core/hal/interface.h:61:20: note: candidates are: typedef int64_t int64 typedef int64_t int64; ^~~~~

In file included from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/../matrix/../algs.h:115:0, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/../matrix/matrix_exp.h:6, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/../matrix/matrix.h:6, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/../matrix.h:6, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/tensor.h:8, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/dnn.h:12, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/recognition/ocr.h:17, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/detection/detection.h:15, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/detection/detection.cpp:19:

../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/../matrix/../uintn.h:27:23: note: typedef long long int dlib::int64 typedef long long int64; ^~~~~`

I am calling the GetTickCount getTickCount that have int64 type, and dlib is also using that int64 type in 'uintn.h' header file. Here's a piece of code that use the getTickCount function:

void FrameSource::plates_processing(){
for (int p = 0; p < pt.plates_data.size(); p++)
{
    int id = pt.plates_data[p].id;   // Plate Id in frame
    //cout << "id: " << id << "    added plate: " << plates_data[id].added_plate << "  new_thread: " << plates_data[id].new_thread << endl;

    plates_data[id].lastTime = getTickCount() / getTickFrequency();
    plates_data[id].plate_type = pt.plates_data[p].plate;

    if (plates_data[id].added_plate)
        continue;

    //another code
}

}

The getTickCount function are defined in core_c.h

CVAPI(int64) cvGetTickCount;

This definition refers to interface.h file

typedef int64_t int64

Which conflicting with Dlib 19.17(compiled with CUDA support) in uintn.h

typedef long long int dlib:: int64

Is there any solution to fix this?

click to hide/show revision 3
retagged

reference to `int64` is ambiguous error with Dlib and OpenCV

Hello, im using OpenCV 4.1.1 and dlib 19.17 on a recognition project with Qt Creator IDE, when compiling the project using Qmake, i got an error like this :

`In file included from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/opencv/cv_image.h:7:0, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/recognition/ocr.h:23, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/detection/detection.h:15, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/detection/detection.cpp:19: /usr/local/include/opencv4/opencv2/core/core_c.h:2582:1: error: reference to ‘int64’ is ambiguous

CVAPI(int64) cvGetTickCount( void );

^

In file included from /usr/local/include/opencv4/opencv2/core/cvdef.h:165:0, from /usr/local/include/opencv4/opencv2/core.hpp:52, from /usr/local/include/opencv4/opencv2/opencv.hpp:52, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/detection/detection.cpp:8:

/usr/local/include/opencv4/opencv2/core/hal/interface.h:61:20: note: candidates are: typedef int64_t int64 typedef int64_t int64; ^~~~~

In file included from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/../matrix/../algs.h:115:0, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/../matrix/matrix_exp.h:6, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/../matrix/matrix.h:6, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/../matrix.h:6, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/tensor.h:8, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/dnn.h:12, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/recognition/ocr.h:17, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/detection/detection.h:15, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/detection/detection.cpp:19:

../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/../matrix/../uintn.h:27:23: note: typedef long long int dlib::int64 typedef long long int64; ^~~~~`

I am calling the getTickCount that have int64 type, and dlib is also using that int64 type in 'uintn.h' header file. Here's a piece of code that use the getTickCount function:

void FrameSource::plates_processing(){
for (int p = 0; p < pt.plates_data.size(); p++)
{
    int id = pt.plates_data[p].id;   // Plate Id in frame
    //cout << "id: " << id << "    added plate: " << plates_data[id].added_plate << "  new_thread: " << plates_data[id].new_thread << endl;

    plates_data[id].lastTime = getTickCount() / getTickFrequency();
    plates_data[id].plate_type = pt.plates_data[p].plate;

    if (plates_data[id].added_plate)
        continue;

    //another code
}

}

The getTickCount function are defined in core_c.h

CVAPI(int64) cvGetTickCount;

This definition refers to interface.h file

typedef int64_t int64

Which conflicting with Dlib 19.17(compiled with CUDA support) in uintn.h

typedef long long int dlib:: int64

Is there any solution to fix this?

click to hide/show revision 4
retagged

reference to `int64` is ambiguous error with Dlib and OpenCV

Hello, im using OpenCV 4.1.1 and dlib 19.17 on a recognition project with Qt Creator IDE, when compiling the project using Qmake, i got an error like this :

`In file included from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/opencv/cv_image.h:7:0, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/recognition/ocr.h:23, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/detection/detection.h:15, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/detection/detection.cpp:19: /usr/local/include/opencv4/opencv2/core/core_c.h:2582:1: error: reference to ‘int64’ is ambiguous

CVAPI(int64) cvGetTickCount( void );

^

In file included from /usr/local/include/opencv4/opencv2/core/cvdef.h:165:0, from /usr/local/include/opencv4/opencv2/core.hpp:52, from /usr/local/include/opencv4/opencv2/opencv.hpp:52, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/detection/detection.cpp:8:

/usr/local/include/opencv4/opencv2/core/hal/interface.h:61:20: note: candidates are: typedef int64_t int64 typedef int64_t int64; ^~~~~

In file included from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/../matrix/../algs.h:115:0, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/../matrix/matrix_exp.h:6, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/../matrix/matrix.h:6, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/../matrix.h:6, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/tensor.h:8, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/dnn.h:12, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/recognition/ocr.h:17, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/detection/detection.h:15, from ../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/detection/detection.cpp:19:

../QTPROJECTSBACKUP/LPR+MVC_FINAL/LPR_TEST2/include/dlib/cuda/../matrix/../uintn.h:27:23: note: typedef long long int dlib::int64 typedef long long int64; ^~~~~`

I am calling the getTickCount that have int64 type, and dlib is also using that int64 type in 'uintn.h' header file. Here's a piece of code that use the getTickCount function:

void FrameSource::plates_processing(){
for (int p = 0; p < pt.plates_data.size(); p++)
{
    int id = pt.plates_data[p].id;   // Plate Id in frame
    //cout << "id: " << id << "    added plate: " << plates_data[id].added_plate << "  new_thread: " << plates_data[id].new_thread << endl;

    plates_data[id].lastTime = getTickCount() / getTickFrequency();
    plates_data[id].plate_type = pt.plates_data[p].plate;

    if (plates_data[id].added_plate)
        continue;

    //another code
}

}

The getTickCount function are defined in core_c.h

CVAPI(int64) cvGetTickCount;

This definition refers to interface.h file

typedef int64_t int64

Which conflicting with Dlib 19.17(compiled with CUDA support) in uintn.h

typedef long long int dlib:: int64

Is there any solution to fix this?