<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>Thanks Joaquim. You are correct, I am using that bat file to configure the VC environment. I did a search and found the 32.bat file so I will try and use that. I’m glad to know someone else can do it which means I am doing something wrong which is what I figured. Thanks for your response.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Best regards,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Marty<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> Joaquim Luis [mailto:jluis@ualg.pt] <br><b>Sent:</b> Saturday, November 26, 2011 5:29 PM<br><b>To:</b> Martin Chapman<br><b>Cc:</b> gdal-dev@lists.osgeo.org<br><b>Subject:</b> Re: [gdal-dev] Compile GDAL for x86 on an x64 machine<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>On 27-11-2011 00:07, Martin Chapman wrote: <o:p></o:p></p><p class=MsoNormal>All,<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>I am using a Windows 7 x64 machine with VS 2010 with both x86 and x64 compile tools. When I try to build gdal for x64 using the make file from the Win64 command prompt and WIN64 = YES in the nmake.opt file everything compiles fine. (using gdal 181 by the way). If I try to compile it for x86 using the Win86 command prompt and comment out WIN64 in nmake.opt file I always get a linker error where the compiler complains that the target machine doesn’t match. I haven’t tried this on my Linux box but now I’m wondering if I am going to have the same issue there as well.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>My question is: Why can’t I compile gdal for x86 on my x64 box? Am I missing something stupid? Do you think it’s my environment? Is it supposed to work? Has anyone else tried to do this? I think I’ve done this before with other versions but maybe I am mistaken.<o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><br>I do build 32 & 64 on my machine that is also Win7 64 and use VC10. You probably did the same mistake I often do. Using the VS vcvarsall.bat for 32 and trying to build the GDAL64 or vice versa.<br><br><br><o:p></o:p></span></p><p class=MsoNormal>On another note. It would be awesome to have gdal use cmake. Just a thought.<o:p></o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><br>There are people currently putting that thought to practice.<br><br>Joaquim<o:p></o:p></span></p></div></body></html>