covartech / PRT

Pattern Recognition Toolbox for MATLAB
http://covartech.github.io/
MIT License
145 stars 70 forks source link

libsvm compilation in Matlab2016a #46

Open patrickkwang opened 8 years ago

patrickkwang commented 8 years ago

prtSetupMex fails with

error: conflicting types for ‘mwIndex’ typedef int mwIndex;

for each .c file in +prtExternal/+libsvm

Libsvm now has a Github page: https://github.com/cjlin1/libsvm/tree/master/matlab and adopting the latest version seems to solve this problem. Specifically, #ifdef MX_API_VER #if MX_API_VER < 0x07030000 typedef int mwIndex; #endif #endif replaces #if MX_API_VER < 0x07030000 typedef int mwIndex; #endif

More testing is required to verify this solution. We should also determine if there is a better way of including dependencies on external software like this.