libhdfs 写新的c程序编译问题

g++  -I/usr/local/jdk1.6.0_27/include/ -I/usr/local/jdk1.6.0_27/include/linux/ -I/usr/local/hadoop-1.0.2/src/c++/libhdfs/ -L/usr/local/hadoop-1.0.2/c++/Linux-amd64-64/lib -lhdfs -L/usr/local/jdk1.6.0_27/jre/lib/amd64/ -L/usr/local/jdk1.6.0_27/jre/lib/amd64/server/ -ljvm hdfs_test.c

 

需要将classpath加入。

export CLASSPATH=`find /usr/local/hadoop-1.0.2/ -name '*.jar' | grep -v 'test' | grep -v 'example' | perl -e '@jars=<STDIN>;chomp @jars; print join(":",@jars);'`

posted on 2012-05-15 14:58  萌@宇  阅读(192)  评论(0编辑  收藏  举报

导航