Hi Mike,
The generated jni libraries have no prefix and the ".so" suffix.
I can only find two macros defined for swig but that could be just be my
ignorance:

SWIG_ADD_MODULE(name language interfacefile)  ==> generate a module named
"name" for language "language" given the swig interface file "interfacefile)

SWIG_LINK_LIBRARIES( name linklib1 linklib2...) ==> link the module "name"
to linklib1,linklib2...etc

I was told in previous post that the .so suffix didn't matter, but with java
it seems to matter.

Gerrick

On 10/20/08 5:12 PM, "Michael Jackson" <[EMAIL PROTECTED]> wrote:

> I can suggest all sorts of ways to set the install_name of the
> libraries BUT I would rather figure out _why_ the swig generated
> libraries are getting the "../../lib" prefix in the first place.
> 
> I don't have any experience with swig so I can only guess at this
> point. Does swig have its own settings for Install_name on OS X?
> 
> Also, which libraries are not correct:
>    The c/c++ libraries?
>    The generated jni libraries?
> 
> All? Both?
> 
> _________________________________________________________
> Mike Jackson                  [EMAIL PROTECTED]
> BlueQuartz Software                    www.bluequartz.net
> Principal Software Engineer                  Dayton, Ohio
> 
> On Oct 20, 2008, at 5:43 PM, Gerrick Bivins wrote:
> 
>> Hello all,
>> I¹m trying to use swig (SWIG_ADD_MODULE, SWIG_LINK_LIBRARIES) to
>> generate java bindings for a library (contains a couple of sub
>> libraries, similar to VTK¹s setup). I haven¹t been able to load the
>> generated shared libraries.
>> There were a couple of issues:
>> € My jvm won¹t load shared libraries unless they are named
>> ³lib{libName}.dylib². Default creates {libName}.so. I was able to
>> modify the properties of my of my targets to change the prefix to
>> ³lib² and the suffix to ³.dylib² and the libs began to load but
>> € My jvm won¹t load the generated shared libraries because the
>> install_name  is set to ³../../lib{libName}.dylib. If I manually
>> change them to simply be lib{libName}.dylib, the shared libs load.
>> 
>> I looked at this link:
>> http://www.cmake.org/pipermail/cmake/2006-October/011530.html
>> 
>>  And tried setting the ³INSTALL_NAME_DIR² property to ³², but this
>> didn¹t work.
>> Any suggestions? I¹m trying to simply create the shared libraries,
>> not bundles or  frameworks.
>> I¹m using cmake 2.6.2 on Mac OSX 10.5.
>> Gerrick
>> 
>> _______________________________________________
>> CMake mailing list
>> CMake@cmake.org
>> http://www.cmake.org/mailman/listinfo/cmake
> 
> _______________________________________________
> CMake mailing list
> CMake@cmake.org
> http://www.cmake.org/mailman/listinfo/cmake

_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to