[Gdal-dev] mingw build, MSVCR71.DLL problem

Pete Nagy Peter.Nagy at vexcel.com
Thu Sep 22 13:45:39 EDT 2005


Hello again ->

  I was able to build gdal fairly easily with mingw, but I have a python
module problem.

  On the mingw build, it is very close to working out of the box.  The
HAVE_BOOLEAN in jmorecfg.h is defined though boolean is not (see earlier
posts), and I had to use --without-pg.  --without-python was not necessary
because configure set it up that way anyway, where the mingw procedure for
python is to run:
  python setup.py build --force --compiler=mingw32 and
  python setup.py install --force
I had to use Norman Vine's setup.py as posted to the list instead of the
one provided with gdal, with the addition of os.path.join("alg") in the
INCLUDE_DIRS.

  OK, so after that, everything builds fine.  I can use gdal.dll in c++
programs, and when I open this dll in Dependency Walker everything is fine
(it depends on MSVCRT.DLL).  However, when I try to import gdal in python,
I get the error 'The procedure entry point _ctype could not be located in
the dynamic link library msvcr71.dll'.  If I open _gdal.pyd it shows that
it depends on MSVCR71.DLL, and everything comes up green except for refs
to _ctype.  Other web posts show similar problems, where it was mentioned
that MSVCR71.DLL does not have the _ctype array for use by the 'is' macros
(like isspace), so I tried to #undef all of these macros in cpl_port.h
after #include <ctype.h>, to force use of functions instead of macros, to
no avail.

  My question is, can anyone explain the use of msvcr71.dll with gdal?
This is a newer dependency; I just needed to grab it when I went to 1.2.6.
Why is it needed instead of msvcrt.dll?  Any ideas why the gdal.dll does
not have this dependency, and the python module does?  Any ideas of
workarounds?

  Thanks,

-> Pete

--------------------------------------------------------------------

====================================================================
Pete Nagy                                        tel: (303) 583-0248
Vexcel Corporation                               fax: (303) 583-0246
http://www.vexcel.com                           home: (303) 823-2336
====================================================================



More information about the Gdal-dev mailing list