Uso de files C con Swift que causa el error del linker

Estoy intentando con esta biblioteca C. He agregado los files a mi proyecto y he creado un file Objective-C para seguir el ejemplo en la página github. He importado el file Objc en mi encabezado de puenteo, pero cuando compilo

Ld /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Products/Debug-iphoneos/trinkeSwift.app/trinkeSwift normal arm64 cd /Users/nickporter/Developer/trinkeSwift export IPHONEOS_DEPLOYMENT_TARGET=8.0 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -L/Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Products/Debug-iphoneos -F/Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Products/Debug-iphoneos -filelist /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/trinkeSwift.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -Xlinker -add_ast_path -Xlinker /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/trinkeSwift.swiftmodule -miphoneos-version-min=8.0 -framework CoreGraphics -framework Foundation -framework UIKit -Xlinker -dependency_info -Xlinker /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/trinkeSwift_dependency_info.dat -o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Products/Debug-iphoneos/trinkeSwift.app/trinkeSwift duplicate symbol _str_time in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/DateGenerator.o duplicate symbol _mymodifier in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/DateGenerator.o duplicate symbol _fromModifier in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/DateGenerator.o duplicate symbol _timePointer in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/DateGenerator.o duplicate symbol _temp_time in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/DateGenerator.o duplicate symbol _set_time in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/DateGenerator.o duplicate symbol _curtime in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/DateGenerator.o duplicate symbol _initialTime in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/DateGenerator.o duplicate symbol _changeAmount in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/DateGenerator.o duplicate symbol _fromChangeAmount in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/DateGenerator.o duplicate symbol _specAmount in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/DateGenerator.o duplicate symbol _finalSpecAmount in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/DateGenerator.o duplicate symbol _unusedText in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/DateGenerator.o duplicate symbol _str_time in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/y.tab.o duplicate symbol _changeAmount in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/y.tab.o duplicate symbol _fromChangeAmount in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/y.tab.o duplicate symbol _temp_time in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/y.tab.o duplicate symbol _set_time in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/y.tab.o duplicate symbol _specAmount in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/y.tab.o duplicate symbol _finalSpecAmount in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/y.tab.o duplicate symbol _mymodifier in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/y.tab.o duplicate symbol _fromModifier in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/y.tab.o duplicate symbol _timePointer in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/y.tab.o duplicate symbol _curtime in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/y.tab.o duplicate symbol _initialTime in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/y.tab.o duplicate symbol _unusedText in: /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/TimeParser.o /Users/nickporter/Library/Developer/Xcode/DerivedData/trinkeSwift-dhbvybojkdowcfffscchwxwgahyj/Build/Intermediates/trinkeSwift.build/Debug-iphoneos/trinkeSwift.build/Objects-normal/arm64/y.tab.o ld: 28 duplicate symbols for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) 

El código en mi class Objc es

 + (NSDate *)dateFromNatrualString:(NSString *)text { NSString *when = text.lowercaseString; char *whenstr = (char *)[when UTF8String]; time_t finalTime = parseDateTimeString(whenstr); str_time= localtime(&finalTime); NSString *thedate = [NSString stringWithCString:asctime(str_time) encoding:NSUTF8StringEncoding]; NSDateFormatter *formatter = [[NSDateFormatter alloc]init]; formatter.dateFormat = @"EEEE MMM dd HH:mm:ss yyyy"; return [formatter dateFromString:thedate]; } 

¿Alguien sabe cómo puedo arreglar esto?

La biblioteca que está utilizando está definiendo símbolos dentro del file TimeParser.h. Cada vez que incluye ese file en su proyecto en más de uno de sus files, termina con definiciones duplicadas. Como ejemplo, las primeras 3 inputs en su logging de errores corresponden a variables definidas en TimeParser.h: str_time , mymodifier y frommodifier .

TimeParser.h solo debe contener declaraciones para evitar este problema. Para ayudarlo con la diferencia entre la statement y la definición, consulte esta publicación: ¿Cuál es la diferencia entre una definición y una statement?