[Gdal-dev] gdal_translate

Ayman Kamal kamal_jo at yahoo.com
Mon Feb 17 03:22:17 EST 2003

Ok Sir,
I read nmake.opt and apps\makefile.vc
I didn't change makevile.vc
I changed nmake.opt to be as follows, and then used
Windows Command Prompt to invoke make file from within
the apps directory:

nmake /f makefile.vc

After that I got the following error:

NMAKE : fatal error U1073: don't know how to make

Here is the namke.opt file listing
# Location to install .exe, .dll and python stuff

PY_INST_DIR = E:\Work\BIN\pymod
LIBDIR = E:\Work\BIN\lib
INCDIR = E:\Work\BIN\include

# Set this to the installed directory containing
python.  If you don't
# have python just let it point to a directory that
does not exist (as now). 
PYDIR   =	E:\Work\Software\Python22

# Uncomment the first for an optimized build or the
second for a debug build.
#OPTFLAGS=	/nologo /Ox 
OPTFLAGS=	/nologo /Zi /Fd$(GDAL_ROOT)\gdal.pdb

# Version number embedded in DLL name. 

# Uncomment the following to link OGR utilities
against main GDAL DLL
# instead of statically linking against OGR libraries.

# Enable all OGR formats, or only raster formats? 
Comment out to disable
# vector formats. 

# Location of Visual C++ directory (only required for
following SETARGV stuff)
VCDIR   = 	D:\Program Files\Microsoft Visual

# Enable the following if VCDIR set properly, and you
want the utility
# programs to be able to expand wildcards. 
#SETARGV =	$(VCDIR)\lib\setargv.obj

# Comment out the following to disable JPEG support.

# Uncomment the following and update to enable ECW
#ECWDIR  = 	D:\Software\ECW_SDK
#ECWLIB  =       $(ECWDIR)\lib\NCSEcw.lib
$(ECWDIR)\lib\NCSEcwC.lib \
#		$(ECWDIR)\lib\NCSUtil.lib

# Uncomment the following and update to enable OGDI
#OGDIDIR =	D:\warmerda\iii\devdir
#OGDILIB =	$(OGDIDIR)\lib\$(TARGET)\ogdi$(OGDIVER).lib
#		$(OGDIDIR)\lib\$(TARGET)\zlib_ogdi$(OGDIVER).lib

# Uncomment for Xerces based GML support.
#XERCES_LIB = $(XERCES_DIR)/lib/xerces-c_1.lib

# Uncomment for JPEG2000 support
#JASPER_DIR = S:\projects_libs\jasper-1.500.4

# Uncommment if you have Frank's modified Kakadu
#KAKDIR =	D:\warmerda\jp2\kakadu

# Uncomment the following and update to enable NCSA
HDF Release 4 support.
#HDF4_DIR =	D:\warmerda\HDF41r5

# Uncomment the following and update to enable FME
#FME_DIR =	d:\Software\fme

OCI_LIB =	$(ORACLE_HOME)\oci\lib\msvc\ociw32.lib \

UPDATED ##################

# Location of MS Data Access SDK (not really needed
anymore I think)
#MSDASDK =	D:\Software\MDAC_2.6

GDAL_DLL =	gdal$(VERSION).dll

INC	=	-I$(GDAL_ROOT)\port -I$(GDAL_ROOT)\ogr


MAKE	=	nmake /nologo

CC	=	cl

CPLLIB	=    $(GDAL_ROOT)/port/cpl.lib
GDALLIB	=    $(GDAL_ROOT)/gdal.lib

	$(CC) $(CFLAGS) /c $*.c

	$(CC) $(CFLAGS) /c $*.cpp


--- Frank Warmerdam <warmerdam at pobox.com> wrote:
> Ayman Kamal wrote:
> > I want to use it as a statically linked library.
> > Can you give me more explanation building apon
> this
> > fact?
> Ayman,
> Since the 1.1.8 release I have added a "devinstall"
> target to the makefile.vc.
> This will copy all include files and the gdal_i.lib
> stub library to a target
> location specified in nmake.opt.
> However, if you want to link against static
> libraries instead of the stub
> library for use of the DLL things are substantially
> more complicated.  I
> think you would need the following directories in
> your include path:
>   $(GDAL_HOME)\port
>   $(GDAL_HOME)\core
>   $(GDAL_HOME)\ogr
> You will need to link against the following library
> files:
>   $(GDAL_HOME)\gdal.lib
>   $(GDAL_HOME)\port\cpl.lib
>   $(GDAL_HOME)\ogr\ogr.lib
> If you are building a Visual Studio project you will
> also need to ensure
> that you use compatible compile options for the GDAL
> static libraries and
> your project.  It is likely best to modify the
> OPTFLAGS macro in the nmake.opt
> file to match your visual studio project and rebuild
> I would stess though, that using the DLL is the
> preferred mechanism for using
> GDAL.  It is easier to build.
> Good luck,
> -- 
> 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
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at remotesensing.org
> http://remotesensing.org/mailman/listinfo/gdal-dev

Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day

More information about the Gdal-dev mailing list