简体   繁体   中英

warning : implicit declaration of function ' crypt_r'

I am trying to write a multi-threaded program in which I need to call the function crypt. But the compiler throws this warning. Also it doesn't recognize crypt_data as well. Any ideas?

You need to include appropriate header file. In this case crypt.h

 #include <crypt.h>

声明函数crypt的原型(转发声明)或包括具有该原型的标头。

Pre-process the source of your program, eg by running gcc -E in place of gcc -c . Look at the output to see if some/all/none of the crypt functions you expect are appearing in the declarations.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM