OpenCV and Sphinx conflicting types

asked 2016-10-10 16:23:49 -0600

Hello there. I'm in a project where we use both OpenCV and Pocketsphinx. It happens that when I compile the sources, I get the following errors about conflict types on "prim_type.h" of sphinx base and "interface.h" of OpenCV:

/usr/local/include/sphinxbase/prim_type.h:129:22: error: conflicting declaration ‘typedef long long int int64’
/usr/local/include/opencv2/core/hal/interface.h:57:20: error: ‘int64’ has a previous declaration as ‘typedef int64_t int64’
/usr/local/include/sphinxbase/prim_type.h:130:28: error: conflicting declaration ‘typedef long long unsigned int uint64’
/usr/local/include/opencv2/core/hal/interface.h:58:21: error: ‘uint64’ has a previous declaration as ‘typedef uint64_t uint64’

How can I solve this problem? I really need both of them on my project.

Thank you so much in advance.

edit retag flag offensive close merge delete

Comments

i guess, you have to seperate your sphinx and opencv code into seperate files, so they don't see each other's headers.

berak gravatar imageberak ( 2016-10-11 03:43:20 -0600 )edit

I already did that. But it doesn't solve the problem at all.

Dourado gravatar imageDourado ( 2016-10-11 23:52:33 -0600 )edit

Hi Dourado,

I'm facing the same issue. Have you find the solution..?

Venkateswaran gravatar imageVenkateswaran ( 2018-05-07 05:42:45 -0600 )edit