kousu / statasvm

SVM in Stata
Other
16 stars 5 forks source link

svmachines needs -libsvm- DLL but not found with svmachines installation #5

Open datadig2017 opened 5 years ago

datadig2017 commented 5 years ago

Hi Nick,

I found your STATA list post and followed all discussions up to August 7, 2019 on the DLL challenge, but I cannot seem to solve this problem on my computer. I don't have admin rights to copy the -libsvm- DLL files to WINDOWS/System32/. I copied everything to the ado folder where the -svmachines- files are but STATA still cannot find them. Did I miss anything?

Thanks for creating this SVM wrapper from the original script by Lin!

By the way my STATA version is 13.1, which also gave me error messages on Stata Plugin Interface 3.0 incompatibility when I tried to run -ngram-

Xiaodong

datadig2017 commented 5 years ago

Hi Nick,

I checked the "svm_ensurelib.ado" script and realized that it tries to circumvent the DLL challenge by adding the DLL file under /ado/plus/l/ folder as the original DLL is named "libsvm.dll". However in the last line of script for customized error message, it seems that the system is looking for a DLL spelled as "svm.dll"? The error message I got onscreen is:

"unable to load svm. You must install dynamic link library svm to use this program".

I manually changed "libsvm.dll" into "svm.dll" and the DLL checking passed. Now there is a different error message when I called the -svmachines- command:

"unknown function ustrpos()" "(error occurred while loading _svm_train.ado)"

This appeared to be a STATA v14 (and higher version) string function... But I can't figure out where _svm_train.ado calls for this string function anyway. How do I circumvent this without spending $1000 to upgrade to STATA version 16?

Thanks!