Обсудить в форуме Комментариев 0Редактировать в вики
How to build TinyOWS on Windows.
This tutotial shows how to build latest TinyOWS code (trunk) on Windows XP Professional with Microsoft Visual C++ 2008 Express Edition using dependencies from OSGeo4W.
Содержание |
First of all we need to do initial setup of the build environment. This described in appropriate article.
Now we have to attend to the dependencies of TinyOWS. We need:
Fortunately all dependecies, except last three items, can be installed with OSGeo4W installer. Choose "Advanced install" and standard directory (C:\OSGeo4W). If you install it in another directory be careful and correct all path below.
Download Flex and install it in C:\OSGeo4W.
Unfortunately PostgreSQL and PostGIS are not available in OSGeo4W so download and install PostgreSQL. Then using StackBuilder install PostGIS 1.5.0 or higher. If you can't use StackBuilder there is a standalone PostGIS installer.
Download and install Subversion. Add subversion directory to the PATH environment variable.
Create directory for TinyOWS sources. Go to "Start → Run" and enter cmd, then go to directory created on previous step and checkout TinyOWS sources:
svn co http://www.tinyows.org/svn/tinyows/trunk
Assuming that PostgreSQL installed in default directory C:\Program Files\PostgreSQL\9.0 and TinyOWS sources are in D:\devel\cpp\tinyows directory.
Go to TinyOWS sources directory and edit nmake.opt file:
TINY_BASE = D:\devel\cpp\tinyows
POSTGIS_DIR ="c:\Program Files\PostgreSQL\9.0"
LIBXML_DIR=c:\OSGeo4W ICONV_DIR=c:\OSGeo4W
REGEX_DIR=c:\OSGeo4W\include\regex-0.12
POSTGIS_INC=-I"c:\Program Files\PostgreSQL\9.0\lib\libpq" -I"c:\Program Files\PostgreSQL\9.0\include" POSTGIS_LIB="c:\Program Files\PostgreSQL\9.0\lib\libpq.lib"
Save edits and close editor.
Edit file D:\devel\cpp\tinyows\Makefile.vc. At the end of the string 19 add C:\OSGeo4W\lib\libfcgi.lib, so string should look like this
CFLAGS=$(BASE_CFLAGS) $(TINY_CFLAGS) c:\OSGeo4W\lib\libfcgi.lib
Edit D:\devel\cpp\tinyows\src\ows_define.h.in. String 27 should be
#if TINYOWS_DEBUG
And string 32
#define TINYOWS_FCGI 1
If you don't want FastCGI support replace 1 with 0. IMPORTANT! Without FastCGI you get low performance.
Now edit file C:\OSGeo4W\include\regex-0.12\regex.c. Replace strings 4876-4880
regerror (errcode, preg, errbuf, errbuf_size) int errcode; const regex_t *preg; char *errbuf; size_t errbuf_size;
with the single string:
regerror (int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)
That's all, now we are ready to compile. Open Visual Studio command prompt from "Start → Programs → Microsoft Visual C++ 2008 Express Edition → Visual Studio Tools → Visual Studio 2008 Command Prompt". Go to the TinyOWS source dir and run
nmake /f Makefile.vc
Process take a while, when it's done tinyows.exe (server application) and tiny.lib (library file) should appear in the sources directory.
Обсудить в форуме Комментариев 0Редактировать в вики
Последнее обновление: 2014-05-14 22:34
Дата создания: 02.05.2011
Автор(ы): Александр Бруй
© GIS-Lab и авторы, 2002-2021. При использовании материалов сайта, ссылка на GIS-Lab и авторов обязательна. Содержание материалов - ответственность авторов. (подробнее).