[swift-users] SwiftProtobuf unable to link on Ubuntu

Edward Connell ewconnell at gmail.com
Sat Oct 14 14:54:54 CDT 2017


Has anyone used the SwiftProtobuf module on Linux?
https://github.com/apple/swift-protobuf

I am able to successfully generate swift classes from my proto file.
However when building, the code compiles but I get a ton of undefined link
references.

I included -Xswiftc -I/home/ed/swift-protobuf/.build/release so the module
is found, but still....

------------------------
/home/ed/Documents/prototest/Sources/DataModel.pb.swift:31: error:
undefined reference to '_T013SwiftProtobuf14UnknownStorageVACycfC'
/home/ed/Documents/prototest/Sources/DataModel.pb.swift:31: error:
undefined reference to '_T013SwiftProtobuf14UnknownStorageVACycfC'
/home/ed/Documents/prototest/Sources/DataModel.pb.swift:64: error:
undefined reference to
'_T013SwiftProtobuf14UnknownStorageV8traverseyxz7visitor_tKAA7VisitorRzlF'
/home/ed/Documents/prototest/Sources/DataModel.pb.swift:0: error: undefined
reference to '_T013SwiftProtobuf7MessagePAAE13isInitializedSbfg'

etc...

Does anyone have a simple working example on Ubuntu?

Ubuntu 16.04
Swift 4.0 release

Thanks, Ed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20171014/9f78f8b3/attachment.html>


More information about the swift-users mailing list