<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'><div style="text-align: left;"><br></div>Hi:<br><br>Thank you for the patch, it works correctly. I applied to my working copy of<br>trunk and It compiles without problem.<br><br>One more question, I had a problem with function VSI_STAT64<br>being undefined. I added the following define in src/port/cpl_config.h <br><br>#define VSI_STAT64 stat<br><br>it compiles, but I am not sure if this is correct or it can<br>cause some problems later.<br><br>Regards<br>Godofredo Contreras<br><br><br><br><hr id="stopSpelling">&gt; From: even.rouault@mines-paris.org<br>&gt; To: frdcn@hotmail.com<br>&gt; Subject: Re: [gdal-dev] Problems building gdal for win ce<br>&gt; Date: Wed, 2 Jul 2008 23:10:26 +0200<br>&gt; CC: gdal-dev@lists.osgeo.org<br>&gt; <br>&gt; Try the attached patch. Please confirm if it works (I've no WINCE available) <br>&gt; and I'll commit that<br>&gt; <br>&gt; Index: port/cpl_strtod.cpp<br>&gt; ===================================================================<br>&gt; --- port/cpl_strtod.cpp (révision 14798)<br>&gt; +++ port/cpl_strtod.cpp (copie de travail)<br>&gt; @@ -145,6 +145,56 @@<br>&gt;  /*                          CPLStrtodDelim()                            */<br>&gt;  /************************************************************************/<br>&gt; <br>&gt; +static void CPLReplacePointByLocalePoint(char* pszNumber, char point)<br>&gt; +{<br>&gt; +#if defined(WIN32CE)<br>&gt; +    static char byPoint = 0;<br>&gt; +    if (byPoint == 0)<br>&gt; +    {<br>&gt; +        char szBuf[16];<br>&gt; +        sprintf(szBuf, "%.1f", 1.0);<br>&gt; +        byPoint = szBuf[1];<br>&gt; +    }<br>&gt; +    if (point != byPoint)<br>&gt; +    {<br>&gt; +        int     i = 0;<br>&gt; +<br>&gt; +        while ( pszNumber[i] )<br>&gt; +        {<br>&gt; +            if ( pszNumber[i] == point )<br>&gt; +            {<br>&gt; +                pszNumber[i] = byPoint;<br>&gt; +                break;<br>&gt; +            }<br>&gt; +            i++;<br>&gt; +        }<br>&gt; +    }<br>&gt; +#else<br>&gt; +    struct lconv *poLconv = localeconv();<br>&gt; +    if ( poLconv<br>&gt; +         &amp;&amp; poLconv-&gt;decimal_point<br>&gt; +         &amp;&amp; strlen(poLconv-&gt;decimal_point) &gt; 0 )<br>&gt; +    {<br>&gt; +        int     i = 0;<br>&gt; +        char    byPoint = poLconv-&gt;decimal_point[0];<br>&gt; +<br>&gt; +        if (point != byPoint)<br>&gt; +        {<br>&gt; +            while ( pszNumber[i] )<br>&gt; +            {<br>&gt; +                if ( pszNumber[i] == point )<br>&gt; +                {<br>&gt; +                    pszNumber[i] = byPoint;<br>&gt; +                    break;<br>&gt; +                }<br>&gt; +                i++;<br>&gt; +            }<br>&gt; +        }<br>&gt; +    }<br>&gt; +#endif<br>&gt; +}<br>&gt; +<br>&gt; +<br>&gt;  /**<br>&gt;   * Converts ASCII string to floating point number using specified delimiter.<br>&gt;   *<br>&gt; @@ -170,30 +220,12 @@<br>&gt;  /*  with the one, taken from locale settings and use standard strtod()  */<br>&gt;  /*  on that buffer.                                                     */<br>&gt;  /* -------------------------------------------------------------------- */<br>&gt; -<br>&gt; -    struct lconv *poLconv = localeconv();<br>&gt;      char        *pszNumber = CPLStrdup( nptr );<br>&gt;      double      dfValue;<br>&gt;      int         nError;<br>&gt; <br>&gt; -    if ( poLconv<br>&gt; -         &amp;&amp; poLconv-&gt;decimal_point<br>&gt; -         &amp;&amp; strlen(poLconv-&gt;decimal_point) &gt; 0 )<br>&gt; -    {<br>&gt; -        int     i = 0;<br>&gt; -        char    byPoint = poLconv-&gt;decimal_point[0];<br>&gt; +    CPLReplacePointByLocalePoint(pszNumber, point);<br>&gt; <br>&gt; -        while ( pszNumber[i] )<br>&gt; -        {<br>&gt; -            if ( pszNumber[i] == point )<br>&gt; -            {<br>&gt; -                pszNumber[i] = byPoint;<br>&gt; -                break;<br>&gt; -            }<br>&gt; -            i++;<br>&gt; -        }<br>&gt; -    }<br>&gt; -<br>&gt;      dfValue = strtod( pszNumber, endptr );<br>&gt;      nError = errno;<br>&gt; <br>&gt; @@ -263,29 +295,12 @@<br>&gt;  /*  on that buffer.                                                     */<br>&gt;  /* -------------------------------------------------------------------- */<br>&gt; <br>&gt; -    struct lconv *poLconv = localeconv();<br>&gt;      char        *pszNumber = CPLStrdup( nptr );<br>&gt;      double      dfValue;<br>&gt;      int         nError;<br>&gt; <br>&gt; -    if ( poLconv<br>&gt; -         &amp;&amp; poLconv-&gt;decimal_point<br>&gt; -         &amp;&amp; strlen(poLconv-&gt;decimal_point) &gt; 0 )<br>&gt; -    {<br>&gt; -        int     i = 0;<br>&gt; -        char    byPoint = poLconv-&gt;decimal_point[0];<br>&gt; +    CPLReplacePointByLocalePoint(pszNumber, point);<br>&gt; <br>&gt; -        while ( pszNumber[i] )<br>&gt; -        {<br>&gt; -            if ( pszNumber[i] == point )<br>&gt; -            {<br>&gt; -                pszNumber[i] = byPoint;<br>&gt; -                break;<br>&gt; -            }<br>&gt; -            i++;<br>&gt; -        }<br>&gt; -    }<br>&gt; -<br>&gt;      dfValue = strtof( pszNumber, endptr );<br>&gt;      nError = errno;<br>&gt; <br>&gt; <br>&gt; Le Wednesday 02 July 2008 22:27:31 godofredo contreras, vous avez écrit&nbsp;:<br>&gt; &gt; Hi:<br>&gt; &gt;<br>&gt; &gt; I´m trying to compile gdal for windows mobile, using windows mobile 5 sdk<br>&gt; &gt; and visual studio 2005 but  I´m getting an undefined reference to<br>&gt; &gt; localeconv in method  CPLStrtodDelim and undefined reference to<br>&gt; &gt; GDALWarpCutlineMasker in method GDALWarpOperation::WarpRegionToBuffer.<br>&gt; &gt;<br>&gt; &gt; Have someone had this problems, any idea to solve them?<br>&gt; &gt;<br>&gt; &gt; Thanks in advance<br>&gt; &gt; Godofredo Contreras<br>&gt; &gt;<br>&gt; &gt; _________________________________________________________________<br>&gt; &gt; Don't get caught with egg on your face. Play chicktionary!<br>&gt; &gt; http://club.live.com/chicktionary.aspx?icid=chick_wlhmtextlink1_feb<br>&gt; <br>&gt; <br><br /><hr />Windows Live Hotmail is giving away Zunes. Enter for your chance to win. <a href='http://www.windowslive-hotmail.com/ZuneADay/?locale=en-US&ocid=TXT_TAGLM_Mobile_Zune_V3' target='_new'>Enter Now!</a></body>
</html>