“Implicit declaration of function ‘ERR_load_crypto_strings’ is invalid in C99 in Xcode.”

huangapple go评论84阅读模式
英文:

Implicit declaration of function 'ERR_load_crypto_strings' is invalid in C99 in Xcode

问题

将构建系统从传统系统更改为新构建系统后,发生了上述错误。我的代码如下。

+ (NSString *) sign:(NSString*) dataString returnRaw:(BOOL)returnRaw{
   
    ERR_load_crypto_strings(); //错误发生在此行
    
    int retEr;
    char* text = (char*) [dataString UTF8String];
    unsigned char *data; 
    .....
英文:

When Change Build System from Legacy to New Build System, above error occurred. My code is as following.

+ (NSString *) sign:(NSString*) dataString returnRaw:(BOOL)returnRaw{
   
    ERR_load_crypto_strings(); //Error Occurs in this line
    
    int retEr;
    char* text = (char*) [dataString UTF8String];
    unsigned char *data; 
    .....

答案1

得分: 1

这个错误消息告诉您函数未找到。
要解决此问题,您需要添加**#import**语句,其中包含声明该函数的头文件的名称。

例如:如果它位于一个单独的框架中,可以使用#import <openssl/ssl.h>,如果它在同一包中,可以使用#import "ssl.h"

英文:

This error message tells you that the function isn't found.
To resolve it, you will need to add #import statement with the name of the header file in which the function is declared.

For example: #import <openssl/ssl.h> if it is in a separate framework, or #import "ssl.h" if it is in the same package.

huangapple
  • 本文由 发表于 2020年1月6日 17:32:51
  • 转载请务必保留本文链接:https://go.coder-hub.com/59609639.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定