Open OgreTransporter opened 7 years ago
platform? compiler ?
platform? compiler ?
Win7+VS2013, Win7+VS2015, Win7+VS2017, Win10+VS2017
This problem appears with the latest version of pcre (v8.42)
--- COLLADABaseUtils/CMakeFiles/OpenCOLLADABaseUtils_shared.dir/all ---
In file included from /construction/opencollada/OpenCOLLADA-1.6.62/COLLADABaseUtils/src/COLLADABUURI.cpp:18:0:
/raven/include/pcre.h:325:33: error: conflicting declaration 'typedef struct real_pcre8_or_16 pcre'
typedef struct real_pcre8_or_16 pcre;
^~~~
In file included from /construction/opencollada/OpenCOLLADA-1.6.62/COLLADABaseUtils/src/COLLADABUURI.cpp:14:0:
/construction/opencollada/OpenCOLLADA-1.6.62/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h:17:26: note: previous declaration as 'typedef struct real_pcre pcre'
typedef struct real_pcre pcre;
compiler is gcc 7.3, platform is *BSD, but that's not really relevant here.
Could the summary please be adjusted to error C2371: 'pcre': redefinition; different basic types / error: conflicting declaration 'typedef struct real_pcre8_or_16 pcre'
in order to make this report easier to find? There is already a duplicate (issue #570).
Not really a fix but I got around it by changing the following in pcre.h
(line 324):
struct real_pcre8_or_16; /* declaration; the definition is private */
typedef struct real_pcre8_or_16 pcre;
To the definition from COLLADABUPcreCompiledPattern.h
:
struct real_pcre;
typedef struct real_pcre pcre;
And it compiled without complaint.
Note that I haven't done much testing or usage of the resulting binary though.
https://github.com/KhronosGroup/OpenCOLLADA/blob/a748c0e07e6b8bed78247a6b7b8bb780a6fe5a4d/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h#L16
Have a look at the current pcre header in line 324 (https://vcs.pcre.org/pcre/code/trunk/pcre.h.in?view=markup#L324):
The current OpenCOLLADA definition creates an error:
https://vcs.pcre.org/pcre/code/trunk/pcre.h.in?r1=1454&r2=1710