3

I'm currently trying to build an app with Cocos2D and Theos but without success.

I have a Jailbroken iPhone 4S (iOS 7.0.4) with :

  • SDK 7.0
  • Clang
  • LLVM
  • LD64

but do not have a Mac.

When I run the make command, it prints a lot of errors :

Making all for application TestCocos2D...
 Copying resource directories into the application wrapper...
 Linking application TestCocos2D...
Undefined symbols for architecture armv7:
  "_CCNextPOT", referenced from:
      -[CCLabelTTF createTextureWithAttributedString:useFullColor:] in CCLabelTTF.m.bd6d7c66.o
      -[CCLabelTTF createTextureWithString:useFullColor:] in CCLabelTTF.m.bd6d7c66.o
      -[CCRenderTexture initWithWidth:height:pixelFormat:depthStencilFormat:] in CCRenderTexture.m.bd6d7c66.o

...........

  "_kmMat4PerspectiveProjection", referenced from:
      -[CCDirectorIOS setProjection:] in CCDirectorIOS.m.bd6d7c66.o
  "_kmVec3Fill", referenced from:
      -[CCDirectorIOS setProjection:] in CCDirectorIOS.m.bd6d7c66.o
  "_kmVec3TransformCoord", referenced from:
      -[CCDirector convertToGL:] in CCDirector.m.bd6d7c66.o
      -[CCDirector convertToUI:] in CCDirector.m.bd6d7c66.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [obj/TestCocos2D.app/TestCocos2D.64873355.unsigned] Error 1
make[1]: *** [internal-application-all_] Error 2
make: *** [TestCocos2D.all.application.variables] Error 2

Makefile :

export TARGET = iphone:clang    

export TARGET_SDK_VERSION = 7.0
export TARGET_IPHONEOS_DEPLOYMENT_VERSION = 7.0
export ARCHS = armv7    

include theos/makefiles/common.mk

APPLICATION_NAME = TestCocos2D
TestCocos2D_FILES = Libraries/cocos2d/Platforms/iOS/CCAppDelegate.m Libraries/cocos2d/Platforms/iOS/CCDirectorIOS.m Libraries/cocos2d/Platforms/iOS/CCES2Renderer.m Libraries/cocos2d/Platforms/iOS/CCGLView.m Libraries/cocos2d/Platforms/iOS/UITouch+CC.m Libraries/cocos2d/CCAction.m Libraries/cocos2d/CCActionCatmullRom.m .... Libraries/cocos2d/cocos2d.m main.m Classes/AppDelegate.m Classes/HelloWorldScene.m Classes/IntroScene.m

TestCocos2D_FRAMEWORKS = UIKit CoreGraphics

include $(THEOS_MAKE_PATH)/application.mk

Folder :

  • control
  • makefile
  • main.m

Classes

  • AppDelegate.h
  • HelloWorldScene.h
  • IntroScene.h
  • AppDelegate.c
  • HelloWorldScene.c
  • IntroScene.c

Libraries

  • link to cocos2d
  • link to cocos2d-ui
  • link to kazmath
  • link to ObjectAL

Newton

Ressources

Link to theos

So, how could I solve those issues ? What should resemble the makefile and the directory ? Is there a way to create a Framwork and use it as UIKit or CoreGraphics in the makefile ?

Thanks a lot in advance.

0 Answers0