Getting started under Java

I just downloaded the OpenCASCADE for Linux and I am having some trouble getting to run the Java sample. I have set the LD_LIBRARY_PATH and all the other settings to what the documentation says, but I still get the following error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/OpenCASCADE5.1/samples/standard/java/Linux/lib/libSampleGeometryJni.so: /opt/OpenCASCADE5.1/ros/Linux/lib/libTKCAF.so: undefined symbol: __start_cp_handler
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1414)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1338)
at java.lang.Runtime.loadLibrary0(Runtime.java:744)
at java.lang.System.loadLibrary(System.java:815)
at SampleGeometryJni.SampleGeometryPackage.(SampleGeometryPackage.java:35)
at SampleGeometryPanel.createViewPanel(SampleGeometryPanel.java:165)
at SamplePanel.jbInit(SamplePanel.java:56)
at SamplePanel.(SamplePanel.java:33)
at SamplePanel.(SamplePanel.java:26)
at SampleGeometryPanel.(SampleGeometryPanel.java:131)
at SamplesStarter.(SamplesStarter.java:75)
at SamplesStarter.main(SamplesStarter.java:235)

Could anyone please suggest what I should try to fix this?

Thanks,
Joan

Joan's picture

To answer my own question, the problem was that the first time I made the symlink to the wrong library (even though the version numbers seem to match better) This is the correct way, but it might depend on your system

[from /usr/lib]
ln -s libstdc++-libc6.2-2.so.3 libstdc++-libc6.1-2.so.3

daima's picture

any solution for this case? I'm having the same problem and wish someone can help me.