[Gdal-dev] Building with Visual C++ 2005 Express

Simon Perkins sy at perkins.net
Fri Dec 30 17:02:13 EST 2005


Some updates. I found a suggestion on the web to simply comment out the 
line #pragma comment(lib, "atlthunk.lib") from the atlbase.h file (found 
in C:\Program Files\Microsoft Platform SDK\include\atl after you install 
the platform SDK). This allowed the compile to complete (after a make 
clean), but when I try to e.g. start gdal_translate from the command 
line, I'm getting the error messsage:

"The application failed to start because MSVCR80.dll was not found. 
Re-installing the application may fix this problem."

Presumably MSVCR80.dll is the Visual Studio 2005 C runtime library, so 
it's a little alarming to say the least if this isn't being found. There 
are several DLLSs with the same name on my machine, so I picked one from 
the WinSxS directory and copied it into the directory containing my 
compiled GDAL executables and libraries, along with MSVCP80.dll. This 
results in a new error message:

"Runtime Error! ... An application has made an attempt to load the C 
runtime library incorrectly..."

Anybody seen this before and know how to fix it?

I'm tempted to bite the bullet and upgrade to Visual Studio 2005 
Standard Edition. Has anyone done this and managed to successfully build 
GDAL?

Has anyone managed to build GDAL using the express edition of Visual C++ 
2005?

Cheers,

Sy




Simon Perkins wrote:

> I'm having some problems building GDAL (latest CVS version) on windows 
> using Visual C++ 2005 Express Edition. I've downloaded and installed 
> the Platform SDK as suggested by the Microsoft install intructions, 
> but am running into a missing ATL library problem:
>
> -- 
>
> ...
> link /dll /debug /INCLUDE:_OGRFeatureStylePuller  /INCLUDE:_OSRValidate
> /INCLUDE:_OPTGetProjectionMethods  /INCLUDE:_OGR_G_GetPointCount  
> /INCLUDE:_OGR
> RegisterAll /INCLUDE:_GDALSimpleImageWarp at 36  
> /INCLUDE:_GDALReprojectImage at 48  /
> INCLUDE:_GDALComputeMedianCutPCT at 32  /INCLUDE:_GDALDitherRGB2PCT at 28  
> /INCLUDE:_v
> bSafeArrayToPtr 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\vb
> 6_support.obj      odbc32.lib                        
> gcore\Version.res  /out:gda
> l13.dll /implib:gdal_i.lib
> Microsoft (R) Incremental Linker Version 8.00.50727.42
> Copyright (C) Microsoft Corporation.  All rights reserved.
>
> LINK : fatal error LNK1104: cannot open file 'atlthunk.lib'
> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 
> 8\VC\BIN\l
> ink.EXE"' : return code '0x450'
> Stop.
>
> -- 
>
> The library atlthunk.lib doesn't appear to exist anywhere on my 
> machine. Doing a google search reveals some articles which suggest 
> that the ATL libraries are not included in visual c++ 2005 express, 
> and that I should install a full version instead. Discussion at:
>
> http://forums.microsoft.com/msdn/showpost.aspx?postid=64509&siteid=1
>
> (you'll need to log on to the MSDN forum to read this).
>
>
> Has anyone else had any luck building GDAL with Visual C++ 2005 
> Express? The ATL library seems to be only required for some VB6 
> backwards compatibility, so is there some easy way of disabling that 
> requirement? Or am I going to have to shell out for Visual Studio 2005 
> Standard? (assuming that includes ATL?) I do also have VS 2003 .NET 
> available, but I'm also using C# 2.0 (which requires Visual C# 2005) 
> and so I'd rather not reinstall 2003 unless I really have to.
>
> Cheers,
>
> Simon
>
>
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev





More information about the Gdal-dev mailing list