SwiftWebSocket icon indicating copy to clipboard operation
SwiftWebSocket copied to clipboard

Doesn't compile on Xcode 11.3.1

Open kronik opened this issue 5 years ago • 2 comments

Hey... My project stopped compiling with the following errors:

Undefined symbol: _inflate Undefined symbol: _zlibVersion Undefined symbol: deflateInit2 Undefined symbol: _inflateEnd Undefined symbol: _deflateEnd Undefined symbol: inflateInit2

Undefined symbols for architecture x86_64:
  "_inflate", referenced from:
      chatapp.(Inflater in _9BC240083F71E5BF5B19CC359CE4C292).inflate(_: Swift.UnsafePointer<Swift.UInt8>, length: Swift.Int, final: Swift.Bool) throws -> (p: Swift.UnsafeMutablePointer<Swift.UInt8>, n: Swift.Int) in WebSocket.o
  "_zlibVersion", referenced from:
      chatapp.(Inflater in _9BC240083F71E5BF5B19CC359CE4C292).init(windowBits: Swift.Int) -> chatapp.(Inflater in _9BC240083F71E5BF5B19CC359CE4C292)? in WebSocket.o
      chatapp.(Deflater in _9BC240083F71E5BF5B19CC359CE4C292).init(windowBits: Swift.Int, memLevel: Swift.Int) -> chatapp.(Deflater in _9BC240083F71E5BF5B19CC359CE4C292)? in WebSocket.o
  "_deflateInit2_", referenced from:
      chatapp.(Deflater in _9BC240083F71E5BF5B19CC359CE4C292).init(windowBits: Swift.Int, memLevel: Swift.Int) -> chatapp.(Deflater in _9BC240083F71E5BF5B19CC359CE4C292)? in WebSocket.o
  "_inflateEnd", referenced from:
      chatapp.(Inflater in _9BC240083F71E5BF5B19CC359CE4C292).deinit in WebSocket.o
  "_deflateEnd", referenced from:
      chatapp.(Deflater in _9BC240083F71E5BF5B19CC359CE4C292).deinit in WebSocket.o
  "_inflateInit2_", referenced from:
      chatapp.(Inflater in _9BC240083F71E5BF5B19CC359CE4C292).init(windowBits: Swift.Int) -> chatapp.(Inflater in _9BC240083F71E5BF5B19CC359CE4C292)? in WebSocket.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

kronik avatar Feb 25 '20 22:02 kronik

briefly - could be U forgot to include some libraries ?!

Screen Shot 2020-02-25 at 5 25 38 PM

smhk avatar Feb 25 '20 23:02 smhk

Hi, Add -l"z" to Other Linker Flag

Farshadgh avatar May 08 '20 11:05 Farshadgh