cocos2d-x 사용 iOS Static Lib를 Release(Archive) Build 하기

 처음 iOS용 Static Lib를 만들때는 Debug Build용 설정을 처리했었죠. 이제는 App Store에 올리기 위해 cocos2d-x를 사용하는 Static Lib의 Archive용 Build Setting Release부분 설정에 대해 정리해봅니다.

 먼저 Device를 연결 후 Scheme를 연결한 Device용으로 선택합니다. 그리고 Product -> Build For -> Archiving Build를 해보시면,

/Volumes/Macintosh HD 2/Program/Engine/cocos2d-2.0-rc2-x-2.0.1/cocos2dx/platform/CCPlatformConfig.h
#error  "Can not recognize the target platform, compling under a unsupported platform?"
#error  "Can not recognize the target platform, compling under a unsupported platform?"
#error  "Can not recognize the target platform, compling under a unsupported platform?"

 위와 같은 에러가 발생합니다. 이는 Release관련 Build Setting이 안 되어있어서 그런건데 맨위에 링크에도 있지만 Preprocessor Macros 아래 2개를 추가해줍니다.
  • NDEBUG
  • TARGET_OS_IPHONE
 다시 Archiving Build하시면 위와 같이 Release-iphoneos 디렉토리에 lib가 생긴걸 확인할 수 있습니다.

 이제 개발중인 App에 Static Debug lib는 삭제하시고 Release빌드 된 Lib를 추가해서 사용하시면 됩니다.

댓글

이 블로그의 인기 게시물

'xxx.exe' 프로그램을 시작할 수 없습니다. 지정된 파일을 찾을 수 없습니다.

goorm IDE에서 node.js 프로젝트로 Hello World Simple Server 만들어 띄워보기

애드센스 수익을 웨스턴 유니온으로 수표대신 현금으로 지급 받아보자.