[Proj] [MS Windows] PVALUE causes problems with mingw64 compilers

Howard Butler howard at hobu.co
Tue May 19 12:03:01 EST 2015

> On May 19, 2015, at 3:46 AM, sisyphus1 at optusnet.com.au wrote:
> Hi,
> The problem arises when the mingw64 header winreg.h gets included.
> We then get errors like:
> C:/tmp64ng/c/include/projects.h:161:47: error: conflicting types for 
>  typedef union { double  f; int  i; char *s; } PVALUE;
> ....
> C:/tmp64ng/c/x86_64-w64-mingw32/include/winreg.h:75:3: note: previous 
> declaration of 'PVALUE' was here
>    ^
> The fairly simple (though tedious) workaround is, prior to building proj, 
> change each of the few occurrences of "PVALUE" in the proj source to a 
> symbol that doesn't clash.
> (I've been using "_P_VALUE", but perhaps something like "PROJVALUE" is a 
> better choice .... I'm happy with *any* symbol that's not going to clash.)
> Could the proj developers please rename "PVALUE" to something that doesn't 
> clash ?
> I really would like to not have to alter the proj source in future proj 
> releases.
> I did raise this matter a few years ago but, as nothing was ever done, I 
> thought that maybe I should instead submit a bug report along with a patch.
> However, AFAICT, to submit a bug report I need to go to 
> http://www.osgeo.org/osgeo_userid/ and create a user id so that I can first 
> log in.
> Unfortunately the link to "this simple form" ( 
> https://www.osgeo.org/cgi-bin/ldap_create_user.py ) results in a "page can't 
> be displayed error" for me.
> There's a suggestion there that this could be a problem with my browser 
> settings, though I don't usually have any trouble with secure connections.
> Is there any other way I can create a user id ?

The https://www.osgeo.org/cgi-bin/ldap_create_user.py page is up for me at  this time.

I have created a ticket with this issue at http://trac.osgeo.org/proj/ticket/273 but I do not know if it is practical to change this union name from PVALUE to something else in what is essentially a public header. Does anyone else have an opinion?


More information about the Proj mailing list