Hi,

I have written a little C++ program, which uses a third party library called ANN (approximate nearest neighbours)....

#include "/home/sekemp/ann_0.2/include/ANN/ANN.h"

I have tried R CMD SHLIB ann.h myProgram.cc, although this compiles when I load it into R I get the following message..

dyn.load("/home/sekemp/ann_0.2/ann.so")
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library "/home/sekemp/ann_0.2/GammaTest.so":
/home/sekemp/ann_0.2/GammaTest.so: undefined symbol: _ZN10ANNkd_treeC1EPPdiii12ANNsplitRule


I get the same error when I dyn.load the myProgram.so aswell.

There is nothing wrong with the ann library as I have used it directly in C++ using the compiler-linker thingy....

g++ myProgram.cc -I/home/sekemp/ann_0.2/include -L/home/sekemp/ann_0.2/lib -lANN

Does anyone have any ideas?

Cheers,

Sam.

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to