以下代码行导致我的 iOS 应用程序出现编译错误
CFStreamCreatePairWithSocketToNetService(kCFAllocatorDefault, (__bridge CFNetServiceRef)netService, &readStream, &writeStream);
如果我用CFStreamCreatePairWithSocketToHost替换代码,它工作正常。
错误如下;
Undefined symbols for architecture i386:
"_CFStreamCreatePairWithSocketToNetService", referenced from:
-[Connection connect] in Connection.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
有人可以帮帮我吗?