Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opencc源码编译bug #58

Open
suyanhj opened this issue Jun 6, 2023 · 0 comments
Open

opencc源码编译bug #58

suyanhj opened this issue Jun 6, 2023 · 0 comments

Comments

@suyanhj
Copy link

suyanhj commented Jun 6, 2023

问题1:在源码编译opencc时,默认cmakefile中指定的cmake版本是3.5,编译时实际上会遇到找不到依赖包的问题,如图:
image

解决: 需要手动下载一份最新的cmake,我用3.26版本就能正常编译

问题2:如果编译时遇到 c++14报错的问题,也需要改cmakefile,指定c++版本
解决:
g++ -std=c++11 -E - < /dev/null // 可检查本地gcc支持哪个版本的c++,可以试试c++11,都是向下兼容
sed -ri-bak 's#(.*-std=)c++14$#\1c++11#' CMakeLists.txt //非交互式修改配置文件

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant