[Gdal-dev] Building on Windows

Matt Hanson mhanson at photon.com
Tue Aug 1 11:06:32 EDT 2006


Norman, thanks.   I think I did the right thing. cpl_config is automatically generated so I thought I needed to change the defines (HAVE_VPRINTF, HAVE_VSNPRINTF, and HAVE_SNPRINTF) to 0's in cpl_config.h.vc.  I don't understand why these functions aren't defined in the MSVC compilers but whatever.
 
Things compiled find but then got a linking error, anyone come across this?
 
 
*************************************************
ogrsf_frmts.lib(parsexsd.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible
link /dll /debug /INCLUDE:_OGRFeatureStylePuller  /INCLUDE:_OSRValidate  /INCLUDE:_OPTGetProjectionMethods  /INCLUDE:_OGR_G_GetPointCount  /INCLUDE:_OGRRegisterAll /INCLUDE:_GDALSimpleImageWarp at 36  /INCLUDE:_GDALReprojectImage at 48  /INCLUDE:_GDALComputeMedianCutPCT at 32  /INCLUDE:_GDALDitherRGB2PCT at 28  /INCLUDE:_vbSafeArrayToPtr at 16  /INCLUDE:_OCTNewCoordinateTransformation at 8 port\*.obj gcore\*.obj alg\*.obj frmts\o\*.obj ogr\ogrsf_frmts\ogrsf_frmts.lib ogr\ogr.lib vb6\vb6_support.obj      odbc32.lib                         gcore\Version.res  /out:gdal13.dll /implib:gdal_i.lib 
/usr/bin/link: too many arguments
Try `/usr/bin/link --help' for more information.
NMAKE : fatal error U1077: 'C:\cygwin\bin\link.EXE' : return code '0x1'
Stop.

**************************************************

 


________________________________

From: Norman Barker [mailto:nbarker at ittvis.com]
Sent: Tue 8/1/2006 4:04 AM
To: Matt Hanson; gdal-dev at lists.maptools.org
Subject: RE: [Gdal-dev] Building on Windows



 

 

________________________________

From: gdal-dev-bounces at lists.maptools.org [mailto:gdal-dev-bounces at lists.maptools.org] On Behalf Of Matt Hanson
Sent: Monday, July 31, 2006 8:54 PM
To: gdal-dev at lists.maptools.org
Subject: [Gdal-dev] Building on Windows

 

Hi, 

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?  

Much thanks!  Here's the error: 

*********************************************** 
$ nmake -f makefile.vc 

Microsoft (R) Program Maintenance Utility Version 8.00.50727.42 
Copyright (C) Microsoft Corporation.  All rights reserved. 

        cd port 
        nmake /nologo /f makefile.vc 
        cl /nologo /MD /EHsc /Zi /Fd..\gdal.pdb -I..\port -I..\ogr -I..\gcore  -I..\alg  /c cpl_conv.cpp 
cpl_conv.cpp 
cpl_conv.cpp(1313) : error C3861: 'snprintf': identifier not found 
NMAKE : fatal error U1077: '"c:\Program Files\Microsoft Visual Studio 8\VC\BIN\cl.EXE"' : return code '0x2' 
Stop. 
NMAKE : fatal error U1077: '"c:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.EXE"' : return code '0x2' 
Stop. 
********************************************* 

 

Matt

 

Hi Matt,

Theres is a thread on snprintf  problems here - http://groups.google.co.uk/group/microsoft.public.vc.language/browse_thread/thread/32d833e0d1d517af/6021c0870b230253%236021c0870b230253

And in port/cpl_config.h  there are already

#define vsnprintf _vsnprintf

#define snprintf _snprintf

I have just compiled GDAL with MSVC 8, you need to install the windows SDK as well if you are using the free version.

Norman

 

 

 

 

 

 





More information about the Gdal-dev mailing list