Ticket #4636 (closed defect: invalid)

Opened 13 months ago

Last modified 11 months ago

will not link vs2010 64bit

Reported by: vindoctor Owned by: warmerdam
Priority: normal Milestone:
Component: ConfigBuild Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

LINK : error LNK2001: unresolved external symbol OGRFeatureStylePuller

1>LINK : error LNK2001: unresolved external symbol OSRValidate 1>LINK : error LNK2001: unresolved external symbol OPTGetProjectionMethods 1>LINK : error LNK2001: unresolved external symbol OGR_G_GetPointCount 1>LINK : error LNK2001: unresolved external symbol OGRRegisterAll 1>LINK : error LNK2001: unresolved external symbol GDALSimpleImageWarp 1>LINK : error LNK2001: unresolved external symbol GDALReprojectImage 1>LINK : error LNK2001: unresolved external symbol GDALComputeMedianCutPCT 1>LINK : error LNK2001: unresolved external symbol GDALDitherRGB2PCT 1>LINK : error LNK2001: unresolved external symbol OCTNewCoordinateTransformation 1>gdal19.dll : fatal error LNK1120: 10 unresolved externals

Change History

Changed 13 months ago by vindoctor

  • milestone changed from 2.0.0 to 1.9.1

Changed 13 months ago by rouault

  • status changed from new to closed
  • severity changed from blocker to normal
  • component changed from default to ConfigBuild
  • priority changed from highest to normal
  • milestone 1.9.1 deleted
  • resolution set to invalid

This is very likely an issue with your setup (perhaps your nmake.local, or missing MSVC_VER=1600) . GDAL builds fine with MSVC 2010. See  http://vbkto.dyndns.org/sdk/ that has SDKs ready to download and compile. You might compare with that what's wrong with your setup.

Closing. Reopen if you have more precise elements

Changed 13 months ago by vindoctor

ok. I've been building gdal for 4 years with VS2005. I guess maybe VS2010 is differant. All I did was get latest and change the 64bit flag to yes and rebuild all.

Changed 13 months ago by vindoctor

  • status changed from closed to reopened
  • resolution invalid deleted

If I open the vs2010 command line (64bit) and build(nmake /f makefile.vc), intead of using the provided vs2010 solution, I get an error that may help figure out whats going with the gdal build system. I'm kinda wondering if a flag somewhere is getting missed in a file, so half is building as x86 and the other half as 64bit?

MSVCRT.lib(ti_inst.obj) : fatal error LNK1112: module machine type 'x64' conflic ts with target machine type 'X86' NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0 \VC\BIN\amd64\link.EXE"' : return code '0x458' Stop.

Changed 13 months ago by vindoctor

I figured it out.. anyone that builds both x86 and 64 bit using vs2010 will run into this. It seems running "clean" from the vs2010 solution/IDE isn't working/cleaning everything. Once I did a "nmake /f makefile.vc clean" and then a nmake /f makefile.vc I was able to build and link! I'm using vs2010 ultimate edition if that matters...

Changed 13 months ago by vindoctor

Incase its not clear, since the clean was not really cleaning all the x86 objects, it was doing a mix/match between the 32 and 64bit objects... hence all sorts of link errors.

Changed 13 months ago by kyle

  • status changed from reopened to closed
  • resolution set to invalid

Seems like Even was correct, re-closing. Reopen if I am wrong.

Changed 11 months ago by vindoctor

Just to note for anyone else having the issue.. I'll try to look more into this when I can.. but in the meantime, a clean build is not really doing a "clean" so make sure you manually delete your files if you do a 32 bit build before your 64bit build.

Note: See TracTickets for help on using tickets.