我有一个.c和.h文件,必须在我的Swift项目中添加。 我创建了一个桥接头并包含.h文件。我得到Apple Mach-O链接器错误如下:
Undefined symbols for architecture x86_64:
"_smooth", referenced from:
__rep_count_data_passing_2 in rep.o
"_tot_samples_rep", referenced from:
__rep_count_data_passing_2 in rep.o
"_oldavg_rep", referenced from:
__rep_count_data_passing_2 in rep.o
"_newavg_rep", referenced from:
__rep_count_data_passing_2 in rep.o
"_newmin_rep", referenced from:
__rep_count_data_passing_2 in rep.o
"_count_idle_rep", referenced from:
__rep_count_data_passing_2 in rep.o
"_rep_count_var", referenced from:
__rep_count_data_passing_2 in rep.o
"_step_cal_incre_rep", referenced from:
__rep_count_data_passing_2 in rep.o
"_avgthresh_rep", referenced from:
__rep_count_data_passing_2 in rep.o
"_avg_rssdat_rep", referenced from:
__rep_count_data_passing_2 in rep.o
"_newmax_rep", referenced from:
__rep_count_data_passing_2 in rep.o
"_minavg_rep", referenced from:
__rep_count_data_passing_2 in rep.o
_IsStep_rep in rep.o
"_maxavg_rep", referenced from:
__rep_count_data_passing_2 in rep.o
_IsStep_rep in rep.o
"_accel_dat_rep", referenced from:
__rep_count_data_passing_2 in rep.o
"_stepflag_rep", referenced from:
_IsStep_rep in rep.o
"_i", referenced from:
__rep_count_data_passing_2 in rep.o
(maybe you meant: __TIvC5CTest11AppDelegate6windowGSqCSo8UIWindow_i)
"_cycle_count_rep", referenced from:
__rep_count_data_passing_2 in rep.o
"_avglen_rep", referenced from:
__rep_count_data_passing_2 in rep.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
问题是什么?我该如何解决这个问题? 提前谢谢!