mac os X 编译问题 就#import 了一个.h文件,编译报错

西客小贝壳 2017-04-16 10:00:51


这个错大家怎么解决的,就#import 了一个.h文件,编译报错
...全文
466 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
scribbler 2017-04-19
  • 打赏
  • 举报
回复
将你代码导入测试工程。并没有发现你的错误

#ifndef OTP_INTERFACE_H_
#define OTP_INTERFACE_H_

#define WIN32 1

#ifdef WIN32
typedef unsigned long long uint64_t;

#include <stdint.h>

typedef uint64_t authnum_t;
#define __stdcall
#endif

#ifdef __cplusplus
extern	"C" {
#endif
    
#define OTP_SUCCESS	(0x00000000L)
#define OTP_ERR_INVALID_PARAMETER	(0x00000001L)
    
#define OTP_ERR_CHECK_PWD	(0x00000002L)
    
#define OTP_ERR_SYN_PWD	(0x00000003L)
    
#define OTP_ERR_REPLAY	(0x000000004)
    
int __stdcall ET_CheckPwdz201(char *authkey, uint64_t t, uint64_t t0,
                                  unsigned int x, int drift, int authwnd, uint64_t lastsucc,
                                  const char *otp, int otplen, uint64_t *currsucc, int *currdft);
    
#ifdef __cplusplus
}
#endif

#endif
西客小贝壳 2017-04-17
  • 打赏
  • 举报
回复
大神们!!!
西客小贝壳 2017-04-17
  • 打赏
  • 举报
回复
就调用了一个这个。h文件
西客小贝壳 2017-04-17
  • 打赏
  • 举报
回复
#ifndef OTP_INTERFACE_H_ #define OTP_INTERFACE_H_ #ifdef WIN32 typedef unsigned __int64 uint64_t; #include <stdint.h> typedef uint64_t authnum_t; #define __stdcall #endif #ifdef __cplusplus extern "C" { #endif #define OTP_SUCCESS (0x00000000L) #define OTP_ERR_INVALID_PARAMETER (0x00000001L) #define OTP_ERR_CHECK_PWD (0x00000002L) #define OTP_ERR_SYN_PWD (0x00000003L) #define OTP_ERR_REPLAY (0x000000004) int __stdcall ET_CheckPwdz201(char *authkey, uint64_t t, uint64_t t0, unsigned int x, int drift, int authwnd, uint64_t lastsucc, const char *otp, int otplen, uint64_t *currsucc, int *currdft);
编天码地 2017-04-17
  • 打赏
  • 举报
回复
这个是库 是静态库吗 是用什么制作出来的
西客小贝壳 2017-04-17
  • 打赏
  • 举报
回复
这个库在C++环境下跑是没有问题的
编天码地 2017-04-16
  • 打赏
  • 举报
回复
你的库有问题 不支持模拟器
西客小贝壳 2017-04-16
  • 打赏
  • 举报
回复
是不是32位和64位问题
西客小贝壳 2017-04-16
  • 打赏
  • 举报
回复

29,027

社区成员

发帖
与我相关
我的任务
社区描述
主要讨论与iOS相关的软件和技术
社区管理员
  • iOS
  • 大熊猫侯佩
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧