[gdal-dev] GDAL Linking issues VS2015 64-bit

Candy, Liam Liam.Candy at angloamerican.com
Thu May 11 07:20:57 PDT 2017


Hi all,

I managed to get the GDAL library with ECW support to compile and link for 32-bit, but realized I need to get the 64-bit library working. I'm having linking issues with this.

I'm running Windows 10, VS2015 command line tools, and trying to build GDAL 2.1.3 with support for ERDAS ECW 5.3. The relevant (I believe) parts of my nmake.opt file are;

WIN64=YES


# Uncomment the following and update to enable ECW read support with the
# 4.1+ readonly SDK
ECWDIR  =  ...\Hexagon\ERDAS_ECW_JPEG_2000_SDK_53
ECWFLAGS = -DECWSDK_VERSION=53 \
       -I$(ECWDIR)\include \
       -I$(ECWDIR)\include/NCSECW/api -I$(ECWDIR)\include/NCSECW/jp2 \
       -I$(ECWDIR)\include/NCSECW/ecw
ECWLIB  =  $(ECWDIR)\lib\vc110\x64\NCSEcw.lib


SYM_PREFIX=


(I've tried SYM_PREFIX=_) as well.




The output I get is;

Generating Code...
        cd ..
        if exist gdal.lib del gdal.lib
        lib /nologo /out:gdal.lib port\*.obj gcore\*.obj alg\*.obj frmts\o\*.obj ogr\ogrsf_frmts\ogrsf_frmts.lib ogr\ogr.lib gnm\*.obj gnm\gnm_frmts\o\*.obj   apps\commonutils.obj apps\gdalinfo_lib.obj apps\gdal_translate_lib.obj apps\gdalwarp_lib.obj apps\ogr2ogr_lib.obj  apps\gdaldem_lib.obj apps\nearblack_lib.obj apps\gdal_grid_lib.obj apps\gdal_rasterize_lib.obj apps\gdalbuildvrt_lib.obj
ogrsf_frmts.lib(ogrjmllayer.obj) : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
ogr.lib(ograpispy.obj) : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
nitf_gcprpc.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
ecwcreatecopy.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
cpl_recode_iconv.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
        link /nologo /dll /INCLUDE:OSRValidate  /INCLUDE:OPTGetProjectionMethods  /INCLUDE:OGR_G_GetPointCount  /INCLUDE:OGRRegisterAll /INCLUDE:GDALSimpleImageWarp  /INCLUDE:GDALReprojectImage  /INCLUDE:GDALComputeMedianCutPCT  /INCLUDE:GDALDitherRGB2PCT  /INCLUDE:OCTNewCoordinateTransformation port\*.obj gcore\*.obj alg\*.obj frmts\o\*.obj ogr\ogrsf_frmts\ogrsf_frmts.lib ogr\ogr.lib gnm\*.obj gnm\gnm_frmts\o\*.obj   apps\commonutils.obj apps\gdalinfo_lib.obj apps\gdal_translate_lib.obj apps\gdalwarp_lib.obj apps\ogr2ogr_lib.obj  apps\gdaldem_lib.obj apps\nearblack_lib.obj apps\gdal_grid_lib.obj apps\gdal_rasterize_lib.obj apps\gdalbuildvrt_lib.obj        D:\Users\LCandy\AppData\Local\Hexagon\ERDAS_ECW_JPEG_2000_SDK_53\lib\vc110\x64\NCSEcw.lib                                                    gcore\Version.res  /out:gdal201.dll /implib:gdal_i.lib
   Creating library gdal_i.lib and object gdal_i.exp
LINK : error LNK2001: unresolved external symbol OSRValidate
LINK : error LNK2001: unresolved external symbol OPTGetProjectionMethods
LINK : error LNK2001: unresolved external symbol OGR_G_GetPointCount
LINK : error LNK2001: unresolved external symbol OGRRegisterAll
LINK : error LNK2001: unresolved external symbol GDALSimpleImageWarp
LINK : error LNK2001: unresolved external symbol GDALReprojectImage
LINK : error LNK2001: unresolved external symbol GDALComputeMedianCutPCT
LINK : error LNK2001: unresolved external symbol GDALDitherRGB2PCT
LINK : error LNK2001: unresolved external symbol OCTNewCoordinateTransformation

Followed by a string of 'unresolved external symbol' errors.

And, to confirm that I'm using the 64-bit compiler / linker from VS, the final line of the output is:

gdal201.dll : fatal error LNK1120: 247 unresolved externals
NMAKE : fatal error U1077: '"D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64_x86\link.EXE"' : return code '0x460'
Stop.

I've been struggling with this for two days, so any help at all would be greatly appreciated.

Best regards,
Liam.

Liam Candy D +27 11 638 2078 M +27 11 282 8658 Ext 8113 2078



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170511/806a0c36/attachment-0001.html>


More information about the gdal-dev mailing list