First, get the latest source (currently 4.7.0) from http://trac.osgeo.org/proj/ and extract it in a convenient place.

4.7.0 added support for Windows native threads, but it doesn't work properly: you can either leave threads enabled (the default), in which case it tries to compile in support for both POSIX and Windows threads, or you can disable threads, in which case it tries to compile both the Windows threads code and the no-threads stubs. In both cases, you lose. The simplest workaround is to edit src/pj_mutex.c; lines 40-42 should look like this:

#ifdef _WIN32
#  define MUTEX_win32
#endif

Insert the following line immediately after #ifdef _WIN32:

#  undef MUTEX_pthread

Now you can configure, build and install:

$ LDFLAGS=-L/c/met.no/lib CPPFLAGS=-I/c/met.no/include ./configure --prefix=/c/met.no --disable-shared
$ make all install
$ cp COPYING /c/met.no/copyright/proj.txt

For details about the threads issue, see http://trac.osgeo.org/proj/ticket/56.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • diana/windows/building/proj.txt
  • Last modified: 2022-05-31 09:29:31
  • (external edit)