cnzf1

Results 5 comments of cnzf1

I met the same problem. Now I had compiled static opencv4.2.0 libraries, then I use externel mode to compile golang program which based on gocv. unfortunately, It cannot work find....

@Danile71 I specified the installed path on /usr/local/opencv when compiled the opencv .

@Danile71 I get the error like 'OpenCV 4.x+ requires enabled C++11 support' as before when compiled the program which based on gocv .

我也遇到这个问题了,就是dict文件的问题,go默认是静态编译,所以一般情况下不用担心是否包含so的问题; 问题是需要可以自定义dict目录才行。

我这样解决了: dictDir := path.Join(filepath.Dir(os.Args[0]), "dict") jiebaPath := path.Join(dictDir, "jieba.dict.utf8") hmmPath := path.Join(dictDir, "hmm_model.utf8") userPath := path.Join(dictDir, "user.dict.utf8") idfPath := path.Join(dictDir, "idf.utf8") stopPath := path.Join(dictDir, "stop_words.utf8") jieba = gojieba.NewJieba(jiebaPath, hmmPath, userPath,...