ios - Linker error in Xcode? -


i getting weird error when attempt run app on simulator. error within following code/file. (i unsure of called):

undefined symbols architecture i386: "_main", referenced from: implicit entry/start main executable ld: symbol(s) not found architecture i386 clang: error: linker command failed exit code 1 (use -v see invocation)    

there 2 parts of error above highlighted in red; "_main", referenced from: , linker command failed exit code 1 (use -v see invocation).

i have never encountered error before. therefore, unable fix it. here code in case necessary:

class viewcontroller: uiviewcontroller {  override func viewdidload() {     super.viewdidload()  }  override func didreceivememorywarning() {     super.didreceivememorywarning()  }  @iboutlet weak var strwordvalue: uilabel! @iboutlet weak var strinputfield: uitextfield!   func textfieldshouldreturn(textfield: uitextfield) -> bool{     textfield.resignfirstresponder()      let word = textfield.text     let score = scoreforword(word)      return true }  var textfield: uitextfield!          private let alphabet = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]  func valueofletter(letter: character) -> int { let letterstring = string(letter).uppercasestring let index = find(alphabet, letterstring)  return index != nil ? index! + 1 : 0 }  func scoreforword(word: string) -> int {     let characters = array(word)     return characters.reduce(0) { sum, letter in sum + self.valueofletter(letter) }   }    func textfield(textfield: uitextfield, shouldchangecharactersinrange range: nsrange, replacementstring string: string) -> bool   { let currentword = textfield.text nsstring let newword = currentword.stringbyreplacingcharactersinrange(range, withstring: string)  let score = scoreforword(newword)  return true } } 

please include explanation of error(s) mean.

this error message happen me few of months ago. library not supported simulator. need run on actual device instead of simulator.

enter image description here


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

ios - Possible to get UIButton sizeThatFits to work? -