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

Simon Perkins sy at perkins.net
Fri Dec 30 19:14:18 EST 2005


For the benefit of other Visual C++ 2005 Express people, here's a 
summary of what I needed to do:

1) Download and install VC++ 2005 Express.

2) Download the Platform SDK, as described at:

http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/

3) Set up paths in the IDE as described there. But also add the 
following two include paths:

C:\Program Files\Microsoft Platform SDK\Include\atl
C:\Program Files\Microsoft Platform SDK\Include\mfc

4) Since we build GDAL from the command line using nmake, I found I had 
to independently set up my LIB, INCLUDE and PATH environment variables 
to include the Visual C++ library, include and executable paths. The 
command shell that comes with VC++ does not unfortunately set these from 
the IDE options, so doesn't include the extra paths you add in the 
IDE... But that shell provides a good start - open it up and then copy 
the relevant bits of the above three variables to your system 
environment variables. Then add on the Platform SDK paths as above.

5) Modify the platform SDK atlbase.h file as described at:

http://groups.yahoo.com/group/wtl/message/12850

You don't actually need to install WTL for GDAL.

6) Everything should now compile using "nmake /f makefile.vc". If you do 
a nmake install or devinstall, then make sure the manifest files get 
copied along with the DLLs and EXEs. This should happen automatically 
with the latest CVS code.


Next task, to check out those C# bindings so I never have to program in 
C++ again... :)

Cheers,

Sy



Simon Perkins wrote:

> OK, got it all to work...
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20051230/59f0d3ed/attachment.html


More information about the Gdal-dev mailing list