[Gdal-dev] Re: GDAL on 64-bit Windows?

Simon Perkins sy at perkins.net
Tue May 16 15:09:05 EDT 2006


OK, fixed all my problems and now have GDAL running on 64-bit windows...
The main issues were:

- Define USE_IN_GDAL in frmts/pcraster/makefile.vc

- Change all the linker INCLUDEs to use undecorated symbol names, i.e.
remove the leading underscore and (in the case of stdcall functions) the
trailing "@nn". I guess 64-bit windows decorates C symbols differently,
though I haven't been able to find this described directly anywhere...

Frank: any thoughts on how you want 64-bit windows handled in nmake.opt?
Let me know and I'll check in my changes.

BTW, this was a fairly basic GDAL build sufficient for my needs - no
optional external libraries and no python bindings - so there are
probably other 64-bit problems lurking...

Cheers,

Sy


On Tue, 16 May 2006 10:37:09 -0600, "Simon Perkins" <sy at perkins.net>
said:
> OK, found the dumpbin utility which seems to be "nm" for windows... Now 
> slowly going through the process of trying to track down these symbols 
> and working out what they might be called on x64. _OGRRegisterAll seems 
> to be simply OGRRegisterAll, for instance (no leading underscore). 
> Anyone know what the significance of that is?
> 
> Cheers,
> 
> Sy
> 
> 
> Simon Perkins wrote:
> > I now get all the formats built, but then fail at the final link of 
> > the GDAL library with some missing symbols:
> >
> > > nmake /f makefile.vc
> > ...
> >        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
> > Microsoft (R) Incremental Linker Version 8.00.50727.42
> > Copyright (C) Microsoft Corporation.  All rights reserved.
> >
> >   Creating library gdal_i.lib and object gdal_i.exp
> > LINK : error LNK2001: unresolved external symbol 
> > _OCTNewCoordinateTransformation at 8
> > LINK : error LNK2001: unresolved external symbol _vbSafeArrayToPtr at 16
> > LINK : error LNK2001: unresolved external symbol _GDALDitherRGB2PCT at 28
> > LINK : error LNK2001: unresolved external symbol 
> > _GDALComputeMedianCutPCT at 32
> > LINK : error LNK2001: unresolved external symbol _GDALReprojectImage at 48
> > LINK : error LNK2001: unresolved external symbol _GDALSimpleImageWarp at 36
> > LINK : error LNK2001: unresolved external symbol _OGRRegisterAll
> > LINK : error LNK2001: unresolved external symbol _OGR_G_GetPointCount
> > LINK : error LNK2001: unresolved external symbol _OPTGetProjectionMethods
> > LINK : error LNK2001: unresolved external symbol _OSRValidate
> > LINK : error LNK2001: unresolved external symbol _OGRFeatureStylePuller
> > gdal13.dll : fatal error LNK1120: 11 unresolved externals
> > NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual 
> > Studio 8\VC\BIN\x86_amd64\link.EXE"' : return code '0x460'
> > Stop.
> >
> > So, the linker is not finding the additional symbols that are added to 
> > the link line via /INCLUDE flags. Perhaps these symbols have different 
> > names on x64? Why are these extra symbols addded? How would I find out 
> > what their equivalents are for x64? Is there some equivalent for "nm" 
> > to dump library symbols on windows?
> >
> > Has nobody out there tried a 64-bit windows compile yet? Surely I'm 
> > not the first! :)
> >
> > Cheers,
> >
> > Sy
> >
> >
> > Simon Perkins wrote:
> >> Hi,
> >>
> >> Has anyone successfully compiled GDAL on 64-bit windows (in 64-bit 
> >> mode). I'm using Visual Studio 2005, with the command line tools 
> >> enabled using the "x86_amd64" option, which uses the 32-bit compiler 
> >> to create 64-bit executables and libraries. With GDAL 1.3.2:
> >>
> >> > nmake /f makefile.vc
> >>
> >> ...
> >>
> >> C:\cygwin\home\154712\src\gdal-1.3.2\frmts>cd pcraster   && nmake 
> >> /NOLOGO /f mak
> >> efile.vc   && cd ..
> >>        cl /nologo /MD /EHsc /Ox -I..\..\port -I..\..\ogr 
> >> -I..\..\gcore  -I..\..
> >> \alg -Ilibcsf /c pcrasterdataset.cpp
> >> pcrasterdataset.cpp
> >> c:\cygwin\home\154712\src\gdal-1.3.2\frmts\pcraster\libcsf\csftypes.h(383) 
> >> : fat
> >> al error C1189: #error :  BYTE ORDER NOT SPECIFIED (CPU_LITTLE_ENDIAN 
> >> or CPU_BIG
> >> _ENDIAN)
> >> NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual 
> >> Studio 8\VC
> >> \BIN\x86_amd64\cl.EXE"' : return code '0x2'
> >> Stop.
> >>
> >> C:\cygwin\home\154712\src\gdal-1.3.2\frmts\pcraster>cd leveller   && 
> >> nmake /NOLO
> >> GO /f makefile.vc   && cd ..
> >> The system cannot find the path specified.
> >>
> >> C:\cygwin\home\154712\src\gdal-1.3.2\frmts\pcraster>cd sgi   && nmake 
> >> /NOLOGO /f
> >> makefile.vc   && cd ..
> >> The system cannot find the path specified.
> >>
> >> C:\cygwin\home\154712\src\gdal-1.3.2\frmts\pcraster>cd idrisi   && 
> >> nmake /NOLOGO
> >> /f makefile.vc   && cd ..
> >> The system cannot find the path specified.
> >>
> >> C:\cygwin\home\154712\src\gdal-1.3.2\frmts\pcraster>cd jpeg   && 
> >> nmake /NOLOGO /
> >> f makefile.vc   && cd ..
> >> The system cannot find the path specified.
> >>
> >> C:\cygwin\home\154712\src\gdal-1.3.2\frmts\pcraster>cd bsb   && nmake 
> >> /NOLOGO /f
> >> makefile.vc   && cd ..
> >> The system cannot find the path specified.
> >>
> >> C:\cygwin\home\154712\src\gdal-1.3.2\frmts\pcraster>cd zlib   && 
> >> nmake /NOLOGO /
> >> f makefile.vc   && cd ..
> >> The system cannot find the path specified.
> >> NMAKE : fatal error U1077: 'for' : return code '0x1'
> >> Stop.
> >> NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual 
> >> Studio 8\VC
> >> \BIN\nmake.EXE"' : return code '0x2'
> >> Stop.
> >>
> >>
> >>
> >> Any ideas?
> >>
> >> Cheers,
> >>
> >> Sy
> >>
> >>
> >



More information about the Gdal-dev mailing list