标头中的Swift typedef结构导致未定义的符号错误

时间:2016-09-12 14:21:53

标签: c++ objective-c swift i386

我有TimeSlot.h文件,其中指定了一些代码:

func setTime(minutes: Int32)
{
  var timeSlot = TimeSlot()
  timeSlot = TimeSlotSetMinutes(timeSlot, minutes)

  device.setTimeSlot(timeSlot)
}

在.swift文件中我想使用这个结构:

Undefined symbols for architecture i386:
"_TimeSlotSetMinutes", referenced from:
AppName.Service. setTime (minutes : Swift.Int32) -> () in Service.o

但是我收到了这个错误:

@Injectable()
class A {
  constructor(private http: Http){ // <-- Injection in root class
  }
  foo(){
    this.http.get()...
  };
}


@Injectable()
class B extends A{
  bar() {
    this.foo();
  }
}

我该怎么做才能让它发挥作用?

0 个答案:

没有答案