0
이 설정을 가져 오는 데 문제가 있습니다.cocoapods와 함께 cocos2d & box2d 사용
내 podfile : 그것은 기본적으로 0
로 설정되어로
platform :ios
pod 'cocos2d', '2.1'
pod 'box2d', '2.3.0'
불행하게도, 우리는 CC_ENABLE_BOX2D_INTEGRATION
필요가 온된다. 그러나 내 주요 의해 어느 시점에서 상속하지 않는 것,
post_install do |installer_representation|
installer_representation.project.targets.each do |target|
if target.name == 'Pods-cocos2d'
target.build_configurations.each do |config|
s = config.build_settings['GCC_PREPROCESSOR_DEFINITIONS']
if s == nil
s = [ '$(inherited)' ]
end
s.push('CC_ENABLE_BOX2D_INTEGRATION=1');
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = s
end
end
end
end
그것은 창]-적인 Cocos2D 대상에 예상대로 플래그를 추가합니다
나는 그렇게 같이 podfile에 post_install 후크를 추가하는 시도 프로젝트,GCC_PREPROCESSOR_DEFINITIONS
에있는
$(inherited)
변수에도 불구하고.
그럼에도 불구하고 CC_ENABLE_BOX2D_INTEGRATION
을 수동으로 편집하면 나는 CCPhysicsSprite
이라는 링커 오류를 찾을 수 없습니다.
누구나 코코아포드와 함께 작동하도록이 두 라이브러리를 성공적으로 설정 했습니까?
podspec에서 .mm 파일을 포함하는 것을 잊어 버렸습니다. 스펙 리포에서 풀 요청을했기 때문에 cocoapod를 사용할 때 라이브러리가 완성되었습니다. – ray