在build過程中出現如下報錯:
Undefined symbols for architecture x86_64:
"ODSocket::ODSocket(int)", referenced from:
ODSocketTest::ODSocketTest() in ODSocketTest.o
"ODSocket::~ODSocket()", referenced from:
ODSocketTest::~ODSocketTest() in ODSocketTest.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
查了下應該是引入的第三方庫編譯時出錯,
將#include "ODSocket/ODSocket.h"調整爲#include"ODSocket.h",將ODSocket的庫文件直接放在class目錄下,編譯就能通過了。