Lawrence David Jesper <l...@...> writes:

> 
> Hello,
> 
> I've been working on setting up mapnik with java through jni so that I can
> render the openstreetmap data. I've compiled mapnik using the scons build
> system successfully, and have run the demo code with no issues.
> 
> I then wrote a c++ program (1 main method) that renders a specific part of
> england (I imported only the data for england due to system restraints).
> The program runs and generates the image as expected. I've attached the
> source code below (request_tiles.cpp). I then change the method from a
> main method to a jni method (request_tiles_jni.cpp), wrote the java method
> (MapnikNative.java), and generated the h file (request_tiles_jni.h). I
> compile the java using jdk1.6.0_14 (64 bit) then run the method. It breaks
> with the following error when it tries to register the data sources:
> 
> /home/ljesper/jdk1.6.0_14/bin/java: symbol lookup error:
> /home/ljesper/bins/mapnik/lib64/mapnik/input/osm.input: undefined symbol:
> _ZN7icu_4_213UnicodeStringC1ERKS0_

I ran into this same problem on Fedora 9 64bit and solved it by changing the
link flags of the shape and raster plugins. A diff follows.


Index: plugins/input/raster/SConscript
===================================================================
--- plugins/input/raster/SConscript     (revision 1516)
+++ plugins/input/raster/SConscript     (working copy)
@@ -33,12 +33,11 @@
         )
 
 libraries = []
-if env['PLATFORM'] == 'Darwin':
-    libraries.append('mapnik')
-    libraries.append('icuuc')
-    libraries.append('icudata')
-    libraries.append('boost_system%s' % env['BOOST_APPEND'])
-    libraries.append('boost_filesystem%s' % env['BOOST_APPEND'])
+libraries.append('mapnik')
+libraries.append('icuuc')
+libraries.append('icudata')
+libraries.append('boost_system%s' % env['BOOST_APPEND'])
+libraries.append('boost_filesystem%s' % env['BOOST_APPEND'])
 
 raster_inputdriver = env.SharedLibrary('raster', source=raster_src,
SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries)
 
Index: plugins/input/shape/SConscript
===================================================================
--- plugins/input/shape/SConscript      (revision 1516)
+++ plugins/input/shape/SConscript      (working copy)
@@ -37,14 +37,12 @@
         )
 
 libraries = ['boost_iostreams%s' % env['BOOST_APPEND']]    
+libraries.append('mapnik')
+libraries.append('icuuc')
+libraries.append('icudata')
+libraries.append('boost_system%s' % env['BOOST_APPEND'])
+libraries.append('boost_filesystem%s' % env['BOOST_APPEND'])
 
-if env['PLATFORM'] == 'Darwin':
-    libraries.append('mapnik')
-    libraries.append('icuuc')
-    libraries.append('icudata')
-    libraries.append('boost_system%s' % env['BOOST_APPEND'])
-    libraries.append('boost_filesystem%s' % env['BOOST_APPEND'])
-
 if env['SHAPE_MEMORY_MAPPED_FILE']:
     cxx_flags = '-DSHAPE_MEMORY_MAPPED_FILE'
 else:



_______________________________________________
Mapnik-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-devel

Reply via email to