msvc toolkit compiler build
Didrik Pinte
dpinte at itae.be
Thu Mar 30 18:10:00 CEST 2006
Le jeudi 30 mars 2006 à 15:53 +0200, Didrik Pinte a écrit :
> Le mercredi 29 mars 2006 à 12:10 +0200, Bernhard Reiter a écrit :
> > One step further in building Thuban 1.1.0 with MinGW.
>
> Good news, there is no need for the full MSVC 7.1 for building
> extension on Windows. The Microsoft Visual C++ Toolkit Compiler (a.k.a.
> MS Toolkit Compiler) is available freely and can do the trick.
>
> I've followed the following steps and it seems to work :
> http://www.vrplumber.com/programming/mstoolkit/
>
> 1) The first correction to thuban/libraries/thuban/wxproj.cpp:
> adding a #undef LP in a line right after the #undef PVALUE
>
> 2) I've updated the setup.py to the wx26 directory and inclusion
Great, it's working. Here are the steps i've followed.
[1] The error was because of a bad use of sqrt function in wxproj.cpp.
The following correction made the trick :
line 468 :
len = (long)sqrt(vx * vx + vy * vy);
becomes :
len = (long)sqrt((float)vx * vx + vy * vy);
[2] Downloaded and build proj 4.4.6
[3] Adapted path to have nmake.exe and lib.exe in the path (from
Platform sdk)
[4] Removed ctl3d32.lib from the setup.py
[5] Downloaded and build gdal 1.3.1
[6] Missing for building gdal, I've created msvcprt.lib
(http://libsh.org/win32/build.html ) :
echo LIBRARY msvcp71.dll > msvcprt.def
echo EXPORTS >> msvcprt.def
lib -dump /exports msvcp71.dll | sed -nf exports.sed >> msvcprt.def
lib /def:msvcprt.def /machine:x86
[7] Problem of MSVCtoolkit in C:\Program Files\Microsoft Platform SDK
\Include\atlPSDK\Include\atl\atlbase.h. The include of atlthunk.lib is
not possible because not given with the environment (same with
VisualStudio Express 2005). You need to remove the following line :
293 : #pragma comment(lib, "atlthunk.lib")
See :
http://www.cs.northwestern.edu/~ayman/blog/archives/2006/01/12/link-error-be-damned/
! if you have the problem, clean the build system before retrying
[8] added gdal\gcore to the list of includes :
gdal_inc = [os.path.join(gdal_prefix, 'alg'),
os.path.join(gdal_prefix, 'ogr'),
os.path.join(gdal_prefix, 'port'),
os.path.join(gdal_prefix, 'gcore'),
os.path.join(gdal_prefix, 'core')]
Then:
python setup.py build
python setup.py install
worked fine... now i need to test it.
Didrik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: Ceci est une partie de message
=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20060330/dc495269/attachment.bin
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)