Call the C + + function prototype as follows, has failed, ask a log breakpoint found that the parameters were not parsed correctly.
int export Init_ner (string cfg_path); typedef int (*proc_init_ner) (string cfg_path); int export fini_ner (); typedef int (*proc_fini_ner) (), String EXPORT process (string input_jsn_str), typedef string (*proc_process) (String input _JSN_STR);
Change the C + + code as follows:
int export init_ner (const char* cfg_path); typedef int (*proc_init_ner) (const char* cfg_path); int export fini_ NER (); typedef int (*proc_fini_ner) (); string EXPORT process (const char* INPUT_JSN_STR); typedef string (*proc_process) ( Const char* INPUT_JSN_STR);
Python will succeed with the following call.
DLL = Windll. LoadLibrary ("NER.dll") Dll.init_ner ("./engine_cfg/ner.cfg")
Python called C++dll function error String type problem