Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/127.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 在c+中链接crypt时出现问题+;项目_C++_C_Encryption_Crypt - Fatal编程技术网

C++ 在c+中链接crypt时出现问题+;项目

C++ 在c+中链接crypt时出现问题+;项目,c++,c,encryption,crypt,C++,C,Encryption,Crypt,我正在尝试使用中包含的crypt()方法。我看过这些类似的问题,但没有找到任何可行的解决方案 我只是简单地包括这两件事 #include <unistd.h> #include <crypt.h> 如何让编译器识别crypt.h?您的系统上是否安装了crypt?如果是,请找到带有crypt.h的目录,并将其添加到编译器的头搜索路径:-I/path/to/crypt/headers 您还需要使用-lcrypt链接到crypt库,可能需要使用-L选项告诉链接器库在哪里 关于

我正在尝试使用中包含的
crypt()
方法。我看过这些类似的问题,但没有找到任何可行的解决方案

我只是简单地包括这两件事

#include <unistd.h>
#include <crypt.h>

如何让编译器识别crypt.h?

您的系统上是否安装了crypt?如果是,请找到带有crypt.h的目录,并将其添加到编译器的头搜索路径:-I/path/to/crypt/headers

您还需要使用-lcrypt链接到crypt库,可能需要使用-L选项告诉链接器库在哪里


关于在OSX上使用crypt的说明:

您正在使用OS X吗?后续:如果您正在使用OS X,则crypt()函数在
中声明。据我所知,没有现成的
。是的,我正在这里开发OS XLook:
hashtable.h:7:19: error: crypt.h: No such file or directory
make: *** [pass.x] Error 1