IXWebSocket
IXWebSocket copied to clipboard
xcode can't compile ixwebsocket library
I tried to put ixwebsocket library in my iOS app project. But xcode failed to compile. It throws an exception
"Undefined symbols for architecture arm64: "ix::initNetSystem()", referenced from: HelloWorld::sayHello() in HelloWorld.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)"
Could you please give me some hint to fix ?
If I understand the comment in the example correctly, ix::initNetSystem() is only necessary on Windows. Since you are on iOS I would leave it out
That's right you don't need to call it on macOS/iOS.
Did you add all source files manually to your xcode project ? If so make sure you added IXNetSystem.cpp to that list.
ix::initNetSystem() is already a no-op on non windows platform, so if you bring it in to your library say on mac it should compile (even if it isn't needed).
https://github.com/machinezone/IXWebSocket/blob/master/ixwebsocket/IXNetSystem.cpp#L22
Will close this.