Setting up Visualization Toolkit (VTK) as project dependency in sbt? -


i'm on ubuntu 13.10.

i'd run visualization toolkit (vtk) in sbt project.

i've installed libvtk on synaptic package manager. can run class vtk example without problems. when try run on sbt via run command, unsatisfiedlinkerror.

i tried several things. means adding vtk.jar lib folder of project , trying several sbt dependencies vtk artenum.

i run whole stuff in sbt, because use other stuff testing , on. compiling class vtk dependency inside no option me.

setting paths , on tried also. mean, can install whole lot of other dependencies without setting paths in os.

an alternative find working graphical tool vtk run dependency in java/scala.

this build.sbt:

name := "selfoo"  version := "1.0"  scalaversion := "2.10.3"  scalacoptions ++= seq("-unchecked", "-deprecation", "-feature")  resolvers ++= seq(   "sonatype oss"  @ "https://oss.sonatype.org/content/repositories/releases",   "typesafe"      @ "http://repo.typesafe.com/typesafe/releases",   "artenum"       @ "http://maven.artenum.com/content/groups/public" )  librarydependencies ++= seq(   "com.typesafe.akka"       %% "akka-actor"     % "2.2.1",   "com.typesafe.akka"       %% "akka-remote"    % "2.2.1",   "com.typesafe.slick"      %% "slick"          % "1.0.1",   "net.liftweb"             %% "lift-json"      % "2.5.1",   // "com.h2database"       %% "h2"             % "1.3.166",   // "com.googlecode.lanterna" %  "lanterna"       % "2.1.6",   "commons-net"             %  "commons-net"    % "3.3",   "jline"                   %  "jline"          % "2.11",   "org.apache.mina"         %  "mina-core"      % "2.0.4",   "org.apache.ftpserver"    %  "ftplet-api"     % "1.0.6",   "org.apache.ftpserver"    %  "ftpserver-core" % "1.0.6",   "org.slf4j"               %  "slf4j-api"      % "1.6.4",   "org.scala-lang"          %  "scala-swing"    % "2.10+",   "vtk"                     %  "vtk"            % "5.8.0",   "org.slf4j"               %  "slf4j-simple"   % "1.6.4") 

and stacktrace get:

[info] compiling 1 scala source /root/ideaprojects/selfoo/target/scala-2.10/classes... [info] running scalacone  [error] (run-main) java.lang.unsatisfiedlinkerror: vtk.vtkpoints.vtkinit()j java.lang.unsatisfiedlinkerror: vtk.vtkpoints.vtkinit()j     @ vtk.vtkpoints.vtkinit(native method)     @ vtk.vtkobject.<init>(vtkobject.java:97)     @ vtk.vtkpoints.<init>(vtkpoints.java:166)     @ scalacone$.<init>(scalacone.scala:12)     @ scalacone$.<clinit>(scalacone.scala)     @ scalacone.main(scalacone.scala)     @ sun.reflect.nativemethodaccessorimpl.invoke0(native method)     @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57)     @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)     @ java.lang.reflect.method.invoke(method.java:606) [trace] stack trace suppressed: run 'last compile:run' full output. java.lang.runtimeexception: nonzero exit code: 1     @ scala.sys.package$.error(package.scala:27) [trace] stack trace suppressed: run 'last compile:run' full output. [error] (compile:run) nonzero exit code: 1 [error] total time: 3 s, completed 21.03.2014 13:13:02 

i try run example scalacone http://ij-plugins.sourceforge.net/vtk-examples/scalacone.html

as of today, vtk not listed on maven-central. due machine-dependent parts doubt ever (since having compiled object code in jar file violates idea of platform independent code - yes aware of things swt).

that being said, simplest solution include vtk java interface directly in project thirdparty element.

if wrapping/java folder of source distribution, find *.in files contain macros expanded cmake. these have adapt in way use system-installed vtk library. rest plain java , should able reuse it.

i aware not best solution, should allow remain platoform independent (you have load shared lib). on other hand, if platform independence not concern, humbly suggest drop java in first place ;).


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -