<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:st1="urn:schemas-microsoft-com:office:smarttags" 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 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>Building on Windows</title>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@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:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
gdal-dev-bounces@lists.maptools.org
[mailto:gdal-dev-bounces@lists.maptools.org] <b><span style='font-weight:bold'>On
Behalf Of </span></b>Matt Hanson<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, July 31, 2006 8:54
PM<br>
<b><span style='font-weight:bold'>To:</span></b> gdal-dev@lists.maptools.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> [Gdal-dev] Building on
Windows</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Hi,</span></font>
<o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>I'm
trying to compile GDAL using the provided makefile.vc files, and I get the same
error right at the beginning. In doing some google searches I found some
posts in the GDAL archive from some chap that had the same problem a couple
years ago….that chap turned out to be me!
However, back then I did resolve the issue somehow, but it wasn't resolved with
any list help so there's no record of what I did. This is a
different computer, and the newest version of Visual Studio so the fact that I'm
the only one to ever have this problem I find rather surprising.
Anyway any suggestions to help me remember what I did? </span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Much
thanks! Here's the error:</span></font> <o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>***********************************************</span></font>
<br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>$
nmake -f makefile.vc</span></font> <o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Microsoft
(R) Program Maintenance Utility Version 8.00.50727.42</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Copyright
(C) Microsoft Corporation. All rights reserved.</span></font> <o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>
cd port</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>
nmake /nologo /f makefile.vc</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>
cl /nologo /MD /EHsc /Zi /Fd..\gdal.pdb -I..\port -I..\ogr -I..\gcore
-I..\alg /c cpl_conv.cpp</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>cpl_conv.cpp</span></font>
<br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>cpl_conv.cpp(1313)
: error C3861: 'snprintf': identifier not found</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>NMAKE
: fatal error U1077: '"c:\Program Files\Microsoft Visual Studio
8\VC\BIN\cl.EXE"' : return code '0x2'</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Stop.</span></font>
<br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>NMAKE
: fatal error U1077: '"c:\Program Files\Microsoft Visual Studio
8\VC\BIN\nmake.EXE"' : return code '0x2'</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Stop.</span></font>
<br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>*********************************************</span></font>
<o:p></o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<p><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New"'>Matt<font color=navy><span style='color:navy'><o:p></o:p></span></font></span></font></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'><o:p> </o:p></span></font></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>Hi Matt,<o:p></o:p></span></font></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>Theres is a thread on snprintf problems here - <a
href="http://groups.google.co.uk/group/microsoft.public.vc.language/browse_thread/thread/32d833e0d1d517af/6021c0870b230253%236021c0870b230253">http://groups.google.co.uk/group/microsoft.public.vc.language/browse_thread/thread/32d833e0d1d517af/6021c0870b230253%236021c0870b230253</a><o:p></o:p></span></font></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>And in port/cpl_config.h there are already<o:p></o:p></span></font></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>#define vsnprintf _vsnprintf<o:p></o:p></span></font></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>#define snprintf _snprintf<o:p></o:p></span></font></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>I have just compiled GDAL with MSVC 8, you need to install
the windows SDK as well if you are using the free version.<o:p></o:p></span></font></p>
<p><st1:place w:st="on"><st1:City w:st="on"><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>Norman</span></font></st1:City></st1:place><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><o:p></o:p></span></font></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'><o:p> </o:p></span></font></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'><o:p> </o:p></span></font></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'><o:p> </o:p></span></font></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'><o:p> </o:p></span></font></p>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>