AnsweredAssumed Answered

Linking Reference C++ Code ?

Question asked by gregkoss on Apr 28, 2014
Latest reply on May 6, 2014 by hassan
I've been trying to link the C++ code to make a program that can read and write to HDFS.  I keep getting the error below from your Makefile. 

How do I get past this error?

Thanks,
-G

<code>
bobwalsh@namenode:/opt/mapr/hadoop/hadoop-0.20.2/src/c++/libhdfs$ make
gcc hdfs_test.o -o hdfs_test -L/usr/lib/jvm/java-7-oracle/jre/lib/amd64/server/ -L/opt/mapr/lib -lMapRClient -ljvm
/opt/mapr/lib/libMapRClient.so: undefined reference to `JNI_GetCreatedJavaVMs'
/opt/mapr/lib/libMapRClient.so: undefined reference to `JNI_CreateJavaVM'
collect2: error: ld returned 1 exit status
make: *** [hdfs_test] Error 1
bobwalsh@namenode:/opt/mapr/hadoop/hadoop-0.20.2/src/c++/libhdfs$

Outcomes