Would be great to start a wiki page with tricks and lessons learned on compiling on windows.
Anyone? http://trac.mapnik.org/wiki/WindowsCompile the Trac is too troublesome. Development Environment: Windows XP SP3, Visual Studio 2005 Mapnik_6_0_1 // has successfully tested for "import mapnik" or "from mapnik import *" on python trunk-r1336 Boost_1_39 GnuWin32 ... 1、Create Project: Mapnik(Win32 Release DLL) a, add Header files from \trunk-r1336\trunk\include\mapnik; b, add Source files from \trunk-r1336\trunk\src; c, add Filter Agg, files from \trunk\agg; d, add Filter TinyXml, files from \trunk-r1336\trunk\tinyxml. 2、some header files of DLL below is necessary will when compiling. C++ Include Path List: ..\include\trunk-r1336\trunk\include; C:\Program Files\boost\boost_1_39; "..\include\trunk-r1336\trunk\agg\include"; ..\include\GnuWin32\include; "..\include\GnuWin32\src\freetype\2.3.5\freetype-2.3.5\include"; "..\include\proj-4.7.0\proj-4.7.0\src"; "..\libxml2-2.7.6.win32\include\"; "..\include\tiff-3.9.2\tiff-3.9.2\libtiff"; "..\include\trunk-r1336\trunk"; ..\include\icu40\include; "..\include\trunk-r1336\trunk\tinyxml" 3、C++ Preproessor Definition WIN32; NDEBUG; _WINDOWS; _USRDLL; MAPNIK_EXPORTS; BOOST_PROPERTY_TREE_XML_PARSER_TINYXML; TIXML_USE_STL 4、Linker add lib: libtiff.lib freetype.lib ltdl.lib jpeg.lib libpng.lib libiconv.lib proj.lib libxml2.lib icuuc.lib then I can get mapnik.dll, 1.15MB. copy mapnik.dll and other essential DLLs() to C:\mapnik_0_6_1\lib, replace the original mapnik.dll of 2.01MB. but it can't work well. I failed to "Import Mapnik" or "from mapnik import *" on Python. someone told me that I have to compile Bindings(\trunk-r1336\trunk\bindings) and Shape(\trunk-r1336\trunk\plugins\input\shape). so I did it, add mapnik.lib icuuc.lib in Bindings DLL Project, but there are 3 errors as follows: "134 error LNK2001: can't parse external symbol "__declspec(dllimport) public: static char const * __cdecl mapnik::enumeration<enum mapnik::Map::aspect_fix_mode,8>::get_string(unsigned int)" (__imp_?get_str...@?$enumeration@w4aspect_fix_m...@map@mapnik@@$...@mapnik@@sap...@z) mapnik_map.obj"...... 错误 133 error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: __thiscall mapnik::enumeration<enum mapnik::Map::aspect_fix_mode,8>::operator enum mapnik::Map::aspect_fix_mode(void)const " (__imp_??b?$enumerat...@w4aspect_fix_mode@m...@mapnik@@$...@mapnik@@qbe?aw4aspect_fix_m...@map@1...@xz) mapnik_map.obj 错误 132 error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: __thiscall mapnik::enumeration<enum mapnik::Map::aspect_fix_mode,8>::enumeration<enum mapnik::Map::aspect_fix_mode,8>(enum mapnik::Map::aspect_fix_mode)" (__imp_??0?$enumerat...@w4aspect_fix_mode@m...@mapnik@@$...@mapnik@@q...@w4aspect_fix_mode@m...@1@@Z) mapnik_map.obj I don't know How to make my mapnik.dll work well? whether my thinking of this procedure is right? ----- China, Mapnik on Windows. -- View this message in context: http://old.nabble.com/Can%27t-C%2B%2BDemo-run-in-Visual-Studio-2005--tp26277089p26524645.html Sent from the Mapnik - Users mailing list archive at Nabble.com. _______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

