Building PROJ on Windows

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

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