tidwall / SwiftWebSocket

Fast Websockets in Swift for iOS and OSX
MIT License
1.53k stars 244 forks source link

Doesn't compile on Xcode 11.3.1 #154

Open kronik opened 4 years ago

kronik commented 4 years ago

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)
smhk commented 4 years ago

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

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

Farshadgh commented 4 years ago

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