I need to be able to call a C++ hashing function from the Boost library as this is not available in our current sas environment . SAS 9.4M3 . This is part of a project to implement LSH (Locality Sensitive hashing ) . I am a C++ novice so what I am missing might be easily resolved by someone more familiar with this technique . I have followed a good example https://support.sas.com/kb/40/562.html which implements a user defined C function using Proc Proto and Proc Fcmp I could get working but it is just a C example . proc proto package=work.proto_ds.cfcns; link '/Data/FCP/2100_STG_RTTM/STG_RT_DS/myfactorial.so'; int myfactorial(int n) ; run; proc fcmp inlib=work.proto_ds outlib=work.fcmp_ds.sasfcns; function sas_myfactorial(x); return (myfactorial(x)); endsub; quit; options cmplib=(work.proto_ds work.fcmp_ds); data _null_; x=sas_myfactorial(6); put x=; run; I tried to compile the same function in C++ using the below commands with some small changes int myfactorial2(int n){ int i; int p; for(p=1, i=2; i<=n; p=p*i, i++); return p; } This is the version of compiler being used in case this has something to do with it g++ --version g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23) g++ -L/Data/FCP/2100_STG_RTTM/STG_RT_DS -c -Wall -ansi -g -fPIC myfactorial2.cpp g++ -shared -o myfactorial2.so -fPIC myfactorial2.o But when I run the Proc Proto I get an ERROR: Unable to find function myfactorial2 . I have tried more basic functions but still the same error . What would be good would be to see is a C++ example similar to the C example . The boost hash function is a bit more complicated but should work . This link details the Proc Proto procedure https://support.sas.com/documentation/onlinedoc/base/91/proto.pdf proc proto package=work.proto_ds.cfcns; link '/Data/FCP/2100_STG_RTTM/STG_RT_DS/myfactorial2.so'; int myfactorial2(int n) ; run; NOTE: '/Data/FCP/2100_STG_RTTM/STG_RT_DS/myfactorial2.so' loaded from specified path. ERROR: Unable to find function myfactorial2 NOTE: Prototypes saved to WORK.PROTO_DS.CFCNS. NOTE: PROCEDURE PROTO used (Total process time): real time 0.00 seconds
... View more