Linux下编译vtk的java版本,linux下vtk安装配置

makedepend -fdepend -I. -I../../../../src/gallium/include

-I../../../../src/gallium/auxiliary

-I../../../../src/gallium/drivers  rbug_core.c

rbug_context.c rbug_objects.c rbug_screen.c  2> /dev/null

make[5]: *** No rule to make target `depend', needed by

`default'.  Stop.

make[5]: Leaving directory

`/usr/local/src/Mesa-8.0.3/src/gallium/drivers/rbug'

make[4]: *** [default] Error 1

make[4]: Leaving directory

`/usr/local/src/Mesa-8.0.3/src/gallium/drivers'

make[3]: *** [default] Error 1

make[3]: Leaving directory

`/usr/local/src/Mesa-8.0.3/src/gallium'

make[2]: *** [subdirs] Error 1

make[2]: Leaving directory

`/usr/local/src/Mesa-8.0.3/src'

make[1]: *** [default] Error 1

make[1]: Leaving directory `/usr/local/src/Mesa-8.0.3'

make: *** [linux-x86] Error 2

网上搜索错误原因,http://ubuntuforums.org/showthread.php?t=1561592给出提示:“sudo

apt-get install xorg-dev”安装xorg-dev后再执行“sudo make

linux-x86”,仍出错。上网搜索(http://www.mesa3d.org/install.html),执行“sudo

./configure”,提示错误“configure: error: makedepend is required to build

Mesa”。搜索(http://www.linuxquestions.org/questions/linux-software-2/configure-error-makedepend-is-required-to-build-mesa-883481/),执行“sudo

apt-get install xutils-dev”(/usr/bin/makedepend

is provided by xutils-dev ,sudo

apt-get install xutils-dev),再试“sudo

./configure”,提示错误“configure: error: flex is needed to build

Mesa”。搜索(http://johnsonchou.blogspot.jp/2009/02/ubuntu-flex-bison.html),执行“sudo

apt-get install flex bison”,再试“sudo ./configure”,提示错误“error: Direct

rendering requires libdrm >= 2.4.24”。执行“sudo apt-get

install libdrm-dev”,再试"sudo ./configure",弹出提示框

“configure: error: Package requirements (x11 xext xdamage

xfixes x11-xcb xcb-glx xxf86vm) were not met:

No package 'x11-xcb' found

No package 'xcb-glx' found

Consider adjusting the PKG_CONFIG_PATH environment variable if

you

installed software in a non-standard prefix.

Alternatively, you may set the environment variables

DRIGL_CFLAGS

and DRIGL_LIBS to avoid the need to call pkg-config.

See the pkg-config man page for more details.

”。搜索(http://freebsd.1045724.n5.nabble.com/testing-rnoland-s-xorg-upgrade-patch-error-td4076678.html),执行“sudo

apt-get install xcb”,安装成功无错误提示后,执行“sudo ./configure”,仍有错误。执行“sudo

apt-get install libx11-xcb-dev”,"sudo apt-get install

libxcb-glx0","sudo apt-get install libxcb-glx0-dev",提示错误:

"checking for expat.h... yes

checking for XML_ParserCreate in -lexpat... yes

checking for INTEL... no

configure: error: Package requirements (libdrm_intel

>= 2.4.30) were not met:

Requested 'libdrm_intel >= 2.4.30' but version

of libdrm is 2.4.26

Consider adjusting the PKG_CONFIG_PATH environment variable if

you

installed software in a non-standard prefix.

Alternatively, you may set the environment variables

INTEL_CFLAGS

and INTEL_LIBS to avoid the need to call pkg-config.

See the pkg-config man page for more details.

"

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是在Linux环境下编译VTKJava版本环境的详细步骤: 1. 下载和安装Java Development Kit (JDK) 在Linux环境中,可以通过命令行安装JDK。在终端中执行以下命令: ``` sudo apt-get update sudo apt-get install openjdk-8-jdk ``` 2. 下载和安装CMake 在Linux环境中,可以通过命令行安装CMake。在终端中执行以下命令: ``` sudo apt-get update sudo apt-get install cmake ``` 3. 下载VTK源代码 可以从VTK的官方网站上下载源代码。下载后,解压缩到任意目录下。 4. 编译VTK 在终端中,进入VTK源代码的根目录。创建一个新的目录,用于存储编译结果。例如: ``` mkdir build cd build ``` 使用CMake生成Makefile: ``` cmake .. ``` 如果需要使用Java支持,需要在CMake命令中加入以下参数: ``` -DVTK_WRAP_JAVA=ON -DVTK_JAVA_HOME=/path/to/java/home ``` 其中,/path/to/java/home是JDK的安装路径。例如,如果JDK安装在/usr/lib/jvm/java-8-openjdk-amd64目录下,则-DVTK_JAVA_HOME的值应该为/usr/lib/jvm/java-8-openjdk-amd64。 执行make命令进行编译: ``` make ``` 5. 安装VTK 编译完成后,执行以下命令进行安装: ``` sudo make install ``` 6. 配置Java环境 将VTKJava库路径添加到LD_LIBRARY_PATH环境变量中。在终端中执行以下命令: ``` export LD_LIBRARY_PATH=/usr/local/lib/vtk-8.2:$LD_LIBRARY_PATH ``` 7. 测试VTK 在终端中进入VTK的Examples/Java目录,执行以下命令: ``` java -classpath .:/usr/local/lib/vtk-8.2/vtk.jar SimpleCone ``` 如果一切正常,应该能够看到一个带有圆锥的窗口。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值