Mac Xcode
ProudNet iOS ๋ฒ์
๊ฐ๋ฐ์ธ์ด: C/C++
Library ๋ฐ Sample: XCode8 Version ์์ ๋น๋
1. ์ฌ์ ์์
ProudNet Library๋ฅผ XCode Project์ ํฌํจํ๋ ๋ฐฉ๋ฒ์ ์๋์ ๊ฐ์ต๋๋ค.
1-1. ์๋์ ํ์ผ์ Mac์ผ๋ก ๋ณต์ฌํฉ๋๋ค.

ProudNet\Sample\Chat\ChatCommon
ProudNet\Sample\Chat\ChatIOS
ProudNet\lib\IOS\LLVM(ํน์ GNU)
ProudNetProudNet\utill\PIDL.exe
1-2. Mac์ฉ Mono๋ฅผ ์ค์นํฉ๋๋ค.
์ฐธ๊ณ
1-3. Sample\ChatIOS ์ ChatIOS.xcodeproj ๋ฅผ ์ฝ๋๋ค.
1-4. Include.xcodeproj ๋ฅผ ํด๋น ํ๋ก์ ํธ์ ์ถ๊ฐํฉ๋๋ค.

1-5. BuildPhases์ Run Script์ ๋ด์ฉ์ ์์ ํฉ๋๋ค.
1-6. Build Settings > Other Linker Flags์ Debug, Relese๋ฅผ ์์ ํฉ๋๋ค.

์ค์ libProudNetClient.a๊ฐ ์์นํ ๊ฒฝ๋ก๋ก ๋ณ๊ฒฝ ํ, LLVM๊ณผ GNU ์ค ์ ํํฉ๋๋ค. ์์ ๊ฐ์ ๋๋ ํ ๋ฆฌ ๊ตฌ์กฐ๋ผ๋ฉด ์คํฌ๋ฆฐ์ท๊ณผ ๊ฐ์ ๋ด์ฉ์ด ๋ฉ๋๋ค.
1-7. ํ์ธ์ ์ํด ChatIOS๋ฅผ ๋น๋ํ ํ, Windows์์ ChatServer๋ฅผ ๊ตฌ๋์์ผ ChatIOS ์ ์ ์ ๋ฌด๋ฅผ ํ์ธํ ์ ์์ต๋๋ค.
Xcode์์ ProudNet ์ฌ์ฉ ์ ์ฃผ์์ฌํญ โป Xcode์์ ๊ธฐ๋ณธ์ผ๋ก ์ ๊ณต๋๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ธ libiconv.dylib๋ฅผ ์ถ๊ฐํฉ๋๋ค. โป mํ์ผ์์ ์ฌ์ฉํ ์ ์๊ธฐ์ ํ์ฅ์๋ฅผ mmํ์ผ๋ก ๋ณ๊ฒฝํด์ผ ํฉ๋๋ค. โป ๋ชจ๋ mmํ์ผ์ #include <new> ๋ฅผ ์ถ๊ฐํด ์ฃผ์ธ์. Xcode์์ STL์ ํค๋ํ์ผ์ ์ ์ธํ ์ ์์ต๋๋ค.
2. ์ค๋ฅ ํด๊ฒฐ
- ProudNet Library ์ถ๊ฐ ์ Link error
ProudNet Library ์ถ๊ฐ ์ Link error๊ฐ ๋ฐ์ํ๋ค๋ฉด ์๋์ ๊ฐ์ ์ต์ ์ ์ถ๊ฐํฉ๋๋ค.

- -all_load -Objc ์ต์
์ฌ์ฉ ์ duplicate symbol ๊ด๋ จ Link error
-all_load -Objc ์ต์ ์ฌ์ฉ ์ duplicate symbol ๊ด๋ จํ Link error์ธ COCOs2d-x๊ฐ ๋ฐ์ํ๋ค๋ฉด Other Linker Flags์ -all_load -Objc ๋์ -force_load ๋ฅผ ์ฌ์ฉํ์๊ธฐ ๋ฐ๋๋๋ค.

๊ฒฝ๋ก๋ฅผ ๋ง์ถฐ์ฃผ๊ธฐ ์ํด PIDL.exe์ ๊ฒฝ๋ก๋ฅผ ๋ง์ถฐ์ค๋๋ค. ์์ ๊ฐ์ ๋๋ ํ ๋ฆฌ ๊ตฌ์กฐ๋ผ๋ฉด mono ../../util/PIDL.exe ../ChatCommon/* -outdir ./ChatIOS/ ๋ก ๋ณ๊ฒฝํด ์ฃผ์ธ์.
Last updated
Was this helpful?