Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经从crypto.c.
crypto.c
如何正确解决此错误?
您需要在其头文件中声明 thacrypt()函数,如下所示:extern "C"
crypt()
extern "C"
#ifdef __cplusplus extern "C" { #endif void crypt(unsigned int *, unsigned int, unsigned int *); #ifdef __cplusplus } #endif
如果您不这样做,C++ 编译器会将其视为具有 C++(而不是 C)链接的函数,并将对其应用名称修饰。