[Gdal-dev] Compiling with MS Visual C++ 6

Frank Warmerdam fwarmerdam at gmail.com
Tue Jan 4 10:46:13 EST 2005


On Tue, 4 Jan 2005 16:04:27 +0100, Eisen Co. Ltd. <wzhang at eisen.de> wrote:
> Dear experts, 
>
> I've got problem to execute the following source from the tutorial with MS
> Visual C++ 6. Could you please give me a step for step instruction how to
> setup the compiling environment? 

Wei,

The windows build instructions for GDAL are at:

  http://www.gdal.org/gdal_building.html

As it notes, you may need to run the VCVARS32.BAT script
that is in your visual studio directory in order to setup the
compiler environment. 

Are you building GDAL from source as well?  If so, I would
suggest setting the GDAL_HOME, BINDIR, LIBDIR, and INCDIR
variables in the nmake.opt appropriately and doing the 
"nmake /f makefile.vc devinstall" target to copy all the include
files, the stub library and the dll to your "installed" tree. 

Then if you save your source as "ogrtest.cpp" you could issue 
a command like:

 cl -IC:\bld\include ogrtest.cpp C:\bld\lib\gdal_i.lib 

This should produce an ogrtest.exe.  This assumes you installed
stuff under \bld of course.  

If you still have problems you will need to be more specific
about your questions.  You can also build your source from
within visual studio, but you will need to setup the include and
library settings appropriately within visual studio.  I don't recall
the details just now, but it isn't hard if you are familiar with
visual studio. 

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the Gdal-dev mailing list