From f48974a685dc952944336bbd3c8ac7f1724136e8 Mon Sep 17 00:00:00 2001 From: Jagadeesha Date: Sat, 15 Apr 2017 07:30:29 +0530 Subject: [PATCH] `enum solver_type` for unnamed enum type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit when I was running cython on svm.pyx it was giving this error `vision/svm.cpp:1379:72: error: use of enum ‘solver_type’ without previous declaration tic CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__solver_type(enum solver_type ^ ` Adding `enum solver_type` fixed it. --- vision/liblinear/linear.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vision/liblinear/linear.h b/vision/liblinear/linear.h index 51ff608..87bd66a 100644 --- a/vision/liblinear/linear.h +++ b/vision/liblinear/linear.h @@ -19,7 +19,7 @@ struct problem double bias; /* < 0 if no bias term */ }; -enum { L2R_LR, L2R_L2LOSS_SVC_DUAL, L2R_L2LOSS_SVC, L2R_L1LOSS_SVC_DUAL, MCSVM_CS, L1R_L2LOSS_SVC, L1R_LR }; /* solver_type */ +enum solver_type { L2R_LR, L2R_L2LOSS_SVC_DUAL, L2R_L2LOSS_SVC, L2R_L1LOSS_SVC_DUAL, MCSVM_CS, L1R_L2LOSS_SVC, L1R_LR }; /* solver_type */ struct parameter {