2021년 10월 1일 금요일

cocos2dx v4.0 xcode 샘플빌드

cocos2dx v4.0 xcode 샘플빌드

cocos2dx 4.0 을 다운받았으면,
프로젝트를 생성하고 프로젝트폴더밑에 iosProject 라는 대충 폴더 만들고 아래를 실행해서 xocde용 프로젝트 파일을 만들어야한다.
cmake … -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos
xxx. xcodeproj 을 실행하고 빌드해보면 안된다.

유저폴더에 libiconv.dylib 얘랑 다른 뭐랑 없단다.
컴퓨터에 있는 파일이다. 찾자.
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libiconv.dylib
에있다.

xcode의 project->build settings -> linking -> other link flag 를 보면 debug 항목이 있는데 클릭하면 맨밑에 에러난 두개(?
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libz.dylib
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libiconv.dylib) 파일이 보인다.
이 경로를 위의 경로로 바꿔치기한다.