[swift-dev] Issues linking a C library module using swift build

Valentin Radu radu.v.valentin at me.com
Mon Dec 14 18:40:56 CST 2015


Sure:

Cloning into '/Users/valentinradu/Playgrounds/April/Packages/libcfcgi'...
warning: --depth is ignored in local clones; use file:// instead.
done.
/Library/Developer/Toolchains/swift-2.2-SNAPSHOT-2015-12-01-a.xctoolchain/usr/bin/swiftc -module-name April -incremental -emit-dependencies -emit-module -emit-module-path /Users/valentinradu/Playgrounds/April/.build/debug/April.swiftmodule -output-file-map /Users/valentinradu/Playgrounds/April/.build/debug/April.o/April/output-file-map.json -c /Users/valentinradu/Playgrounds/April/Sources/main.swift -I /Users/valentinradu/Playgrounds/April/.build/debug -j8 -Onone -g -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -Xcc -F-module-map=/Users/valentinradu/Playgrounds/April/Packages/libcfcgi-1.0.0/module.modulemap -I /Users/valentinradu/Playgrounds/April/Packages/libcfcgi-1.0.0 -I /usr/local/include
/Library/Developer/Toolchains/swift-2.2-SNAPSHOT-2015-12-01-a.xctoolchain/usr/bin/swiftc -o /Users/valentinradu/Playgrounds/April/.build/debug/April /Users/valentinradu/Playgrounds/April/.build/debug/April.o/Sources/main.swift.o -Xlinker -all_load -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -L/usr/local/lib
Undefined symbols for architecture x86_64:
  "_cfcgi_create", referenced from:
      _main in main.swift.o
  "_cfcgi_free", referenced from:
      _main in main.swift.o
  "_cfcgi_start_and_wait", referenced from:
      _main in main.swift.o
ld: symbol(s) not found for architecture x86_64
<unknown>:0: error: build had 1 command failures
swift-build: exit(1): ["/Library/Developer/Toolchains/swift-2.2-SNAPSHOT-2015-12-01-a.xctoolchain/usr/bin/swift-build-tool", "-v", "-f", "/Users/valentinradu/Playgrounds/April/.build/debug/April.o/llbuild.yaml"]



More information about the swift-dev mailing list