Did anyone succeed to include cocox2d-x proj to iOS proj?

I’m trying to include cocos2d-x project (call it B) into an existing iOS project (call it A). B has cocos2dx xcodeproj inside of itself.
I included B.xcodeproj into A.xcodeproj. (add existing files to project…)
However, when I try to reference a class from B, xcode shows “Undefined symbol” linker error.

Undefined symbols for architecture x86_64:
  "HellTheWorldScene::createScene()", referenced from:
      -[ClockQuizViewController prepareNewGameWithLevel:] in ClockQuizViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The source file from A included header file from B, but it seems like from A’s side, it cannot locate symbol included from header.
I’m trying to make a target to create a static library with B, then include it to A, but I’m failed at this moment.
Do you have any idea with it?

I don’t think a static library is the answer. if anything you should be making a .framework.

And to be sure, you told “B” to build as a static library, etc in the build settings?

Currently, I build B as a binary (.app). I mean, I tried to build it as a static library, but failed - too many build errors to catch up…