syphilis has asked for the wisdom of the Perl Monks concerning the following question:
And the error it produces:use warnings; use Inline C => <<'EOC'; #include <projects.h> SV * foo() { printf("Hello World\n"); } EOC foo();
Line 150 of projects.h:In file included from try_pl_f857.xs:6: C:\_64\msys\1.0\local\include/projects.h:150: error: conflicting types + for 'PVALUE' c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winreg.h:76: n +ote: previous declaration of 'PVALUE' was here dmake: Error code 129, while making 'try_pl_f857.o'
and line 76 of winreg.h:typedef union { double f; int i; char *s; } PVALUE;
One solution is to change the typedef in projects.h to something else (I chose _P_VALUE), and to amend the other libproj source files accordingly, then re-compile and re-install the library. That's fairly simple as PVALUE crops up in only a few places ... and that works well.typedef PVALUEA PVALUE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: [OT] "conflicting types" in C headers.
by BrowserUk (Patriarch) on Apr 30, 2010 at 08:55 UTC |