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

编译sm3test出错,求指教 #36

Closed
yihong731 opened this issue Jul 29, 2016 · 6 comments
Closed

编译sm3test出错,求指教 #36

yihong731 opened this issue Jul 29, 2016 · 6 comments

Comments

@yihong731
Copy link

没有像openssl,采用-lcrypto的参数,采用如下参数进行编译,提示错误:

chen@debian-chen:~/work/GmSSL/GmSSL/crypto/sm3$ gcc sm3.c sm3test.c -o sm3test
/tmp/ccwkkwmq.o:在函数‘main’中:
sm3test.c:(.text+0x34):对‘EVP_sm3’未定义的引用
sm3test.c:(.text+0x61):对‘EVP_Digest’未定义的引用
collect2: error: ld returned 1 exit status
谢谢!

@yihong731
Copy link
Author

追问,也可以像Openssl一样,采用-lcrypto的参数吗?

@LiTianjue
Copy link

先编译GmSSL的库,编译测试程序的时候要指定GmSSL的头文件(-I)和库(-L)

@yihong731
Copy link
Author

谢谢! 是在编译命令的尾部添加吗?能否具体指导一下。

@yihong731
Copy link
Author

gcc sm3.c sm3test.c -o sm3test -lcrypto -ldl
这样就可以了。

但是sms4speed.c的编译还是存在问题尚未解决。

@guanzhi
Copy link
Owner

guanzhi commented Aug 2, 2016

编译sms4speed.c需要安装OpenMP环境

@github-actions
Copy link

Marked as stale issue. Will be closed later if no activity for a while.

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

No branches or pull requests

3 participants