Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCRE error #547

Open
OgreTransporter opened this issue Aug 27, 2017 · 5 comments · May be fixed by #582
Open

PCRE error #547

OgreTransporter opened this issue Aug 27, 2017 · 5 comments · May be fixed by #582

Comments

@OgreTransporter
Copy link

Have a look at the current pcre header in line 324 (https://vcs.pcre.org/pcre/code/trunk/pcre.h.in?view=markup#L324):

struct real_pcre8_or_16;          /* declaration; the definition is private  */
typedef struct real_pcre8_or_16 pcre; 

The current OpenCOLLADA definition creates an error:

pcre.h(325): error C2371: 'pcre': redefinition; different basic types

https://vcs.pcre.org/pcre/code/trunk/pcre.h.in?r1=1454&r2=1710

@RemiArnaud
Copy link
Contributor

platform? compiler ?

@OgreTransporter
Copy link
Author

OgreTransporter commented Nov 2, 2017

platform? compiler ?

Win7+VS2013, Win7+VS2015, Win7+VS2017, Win10+VS2017

@jrmarino
Copy link

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.

@devurandom
Copy link

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).

devurandom added a commit to devurandom/OpenCOLLADA that referenced this issue Jul 12, 2018
This fixes a compilation error with libpcre-8.42:
```
error: conflicting declaration 'typedef struct real_pcre8_or_16 pcre'
```

Closes: KhronosGroup#547
Closes: KhronosGroup#570
devurandom added a commit to devurandom/OpenCOLLADA that referenced this issue Jul 12, 2018
This fixes a compilation error with libpcre-8.42:
```
error: conflicting declaration 'typedef struct real_pcre8_or_16 pcre'
```

Closes: KhronosGroup#547
Closes: KhronosGroup#570
@ewth
Copy link

ewth commented Aug 1, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants