Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Failed on Xcode8.3.3 , macOS 10.13, cocos2d-x 3.16 #32

Open
drelaptop opened this issue Oct 16, 2017 · 19 comments
Open

Build Failed on Xcode8.3.3 , macOS 10.13, cocos2d-x 3.16 #32

drelaptop opened this issue Oct 16, 2017 · 19 comments

Comments

@drelaptop
Copy link

Env: Xcode8.3.3 , macOS 10.13, cocos2d-x 3.16

this is the step, I did

  1. use cocos command make out IOS library
  2. copy libs
  3. fllow this
$ git clone https://github.com/chukong/programmers-guide-samples.git
$ cd programmers-guide-samples/cpp
$ open proj.ios_mac/Programmers\ Guide.xcodeproj/
  1. run on Xcode, failed

It seems like much framework find failed, for many of them is RED clolor

will you test this demo using cocos2d-x v3.16 on Xcode8.3.3 ?

@slackmoehrle
Copy link
Contributor

slackmoehrle commented Oct 16, 2017 via email

@slackmoehrle
Copy link
Contributor

So there are issues. I have most of them worked out except this:

Undefined symbols for architecture x86_64:
  "_CTFramesetterCreateWithAttributedString", referenced from:
      _calculateShrinkedSizeForString(NSAttributedString**, objc_object*, CGSize, bool, int&) in libcocos2d iOS.a(CCDevice-ios.o)
  "_CTFramesetterSuggestFrameSizeWithConstraints", referenced from:
      _calculateShrinkedSizeForString(NSAttributedString**, objc_object*, CGSize, bool, int&) in libcocos2d iOS.a(CCDevice-ios.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@slackmoehrle
Copy link
Contributor

slackmoehrle commented Oct 16, 2017

BTW. These samples need some updating. We were going to automate the building process better and make each chapter run-able.

@slackmoehrle
Copy link
Contributor

ok, I fixed this. Not it builds and runs, but I noticed I still have hard coded paths in a few places in the build settings. I can work on making this generic.

@slackmoehrle
Copy link
Contributor

BTW, I am doing this in branch v3.16.

@slackmoehrle
Copy link
Contributor

@drelaptop were you able to get this to build at least? I know it looks funny and needs to be fixed. I can put this on my list.

@drelaptop
Copy link
Author

@slackmoehrle I will try it today, and then get the result

@drelaptop
Copy link
Author

Build Failed on Xcode8.3.3 , macOS 10.13 Again

  1. build error cocos2d.h file not found
  2. much library not found, for example
SDKs/MacOSX10.12.sdk/usr/lib/libcurl.dylib

I can't find this file in my PC, but find libcurl.4.tbd tbd format file!
3. I didn't find SDKs/MacOSX10.12.sdk/.. , should I download that SDK?

@drelaptop
Copy link
Author

BTW, I build on branch v3.16, code at least

@slackmoehrle
Copy link
Contributor

Sorry. Are you using v3.16 branch and getting this error? Did you change your include paths?

@drelaptop
Copy link
Author

yes, I get the error on v3.16 branch. I didn't change anything, should I change include paths? how

@drelaptop
Copy link
Author

drelaptop commented Oct 24, 2017

@slackmoehrle

Build Success on Xcode8.3.3 , macOS 10.13, Using v3.16

Solve Error Steps:

  1. modify library paths one by one
  2. change include paths, follow Creating And Using Prebuilt Libraries chapter
  3. modify Linking paths
  4. remove x86_64 on config Valid Architecture to fix error like
missing required architecture x86_64 in file...
Undefined symbols for architecture x86_64:

@slackmoehrle
Copy link
Contributor

slackmoehrle commented Oct 24, 2017 via email

@drelaptop
Copy link
Author

how to find which is wrong, and add right frameworks

▶ lipo -info libcocos2d\ iOS.a
Architectures in the fat file: libcocos2d iOS.a are: i386 armv7

mean libcocos2d iOS.a didn't support x86_64 or not?

@slackmoehrle
Copy link
Contributor

You must not have build the libraries the same way I did or something because I have this:

$ lipo -info libcocos2d\ iOS.a
Architectures in the fat file: libcocos2d iOS.a are: i386 armv7 x86_64 arm64

@drelaptop
Copy link
Author

Command I used is cocos gen-libs -c -p ios -m debug, something else need to do?

@slackmoehrle
Copy link
Contributor

@drelaptop would you like me to fix this to run in XCode 8, 9 and Android Studio?

@drelaptop
Copy link
Author

@slackmoehrle oh! I hope so, but I think it's not a urgent things, and I prefer you finish the unfinished 4 items of docs first.

@slackmoehrle
Copy link
Contributor

@drelaptop agreed. I just didn't want to lose track of this. I think I may re-write this a bit too at the same time. I will get this fixed in a few weeks. I a writing a Cocos Creator demo that is more important. I will write the docs too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants