-1

I have a problem with static library creation, I want to create static library with existing sorce code and existing thirdparty framework like metaio framework.But when I am creating static library with out metaio framework (Third party framework) It is workin Fine. But when adding metaio framework (Third party framework) into static library It is showing a lot of errors. Is it possible or not ? Which is happining in Xcode4.5 and Xcode4.6.

Errors Like:

"Undefined symbols for architecture armv7: "metaio::SensorsComponentIOS::getSensorComponentImpl()", referenced from: -[Tutorial5ViewController loadContent] in libmetaio.a(Tutorial5ViewController.o) "metaio::CreateMetaioSDKIOS(std::__1::basic_string, std::__1::allocator > const&)", referenced from: "metaio::getDeviceType()", referenced from: -[EAGLView enableAntialiasing] in libmetaio.a(EAGLView.o)

::~basic_string()", referenced from: -[MetaioSDKViewController viewDidLoad] in libmetaio.a(MetaioSDKViewController.o) -[Tutorial5ViewController touchesBegan:withEvent:] in libmetaio.a(Tutorial5ViewController.o) ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)" but i was created in the same architectures like arm7 and arm7s, But it is working fine with out adding metaio framework.

maren iOS
  • 486
  • 1
  • 5
  • 14
  • There is no Xcode5 or Xcode6. What are the errors you get? Give us more details! – Till Mar 06 '13 at 03:09
  • sorry, it mean 4.5 and 4.6 – maren iOS Mar 06 '13 at 03:14
  • Hi Till could u pls give me the solution for that – maren iOS Mar 06 '13 at 03:14
  • Could you give us more details like the exact error messages? – Till Mar 06 '13 at 03:20
  • Hi Till could u pls give me the solution for that actually i'm getting errors like "Undefined symbols for architecture armv7: "metaio::SensorsComponentIOS::getSensorComponentImpl()", referenced from: -[Tutorial5ViewController loadContent] in libmetaio.a(Tutorial5ViewController.o) "metaio::CreateMetaioSDKIOS(std::__1::basic_string, std::__1::allocator > const&)", referenced from: – maren iOS Mar 06 '13 at 03:27
  • "metaio::getDeviceType()", referenced from: -[EAGLView enableAntialiasing] in libmetaio.a(EAGLView.o) >::~basic_string()", referenced from: -[ARELViewController onSDKReady] in libmetaio.a(ARELViewController.o) -[MetaioSDKViewController viewDidLoad] in libmetaio.a(MetaioSDKViewController.o) -[Tutorial5ViewController touchesBegan:withEvent:] in libmetaio.a(Tutorial5ViewController.o) ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)" – maren iOS Mar 06 '13 at 03:28
  • but i was created in the same architectures like arm7 and arm7s,But is working fine with out adding metaio framework. – maren iOS Mar 06 '13 at 03:29
  • @prakashios - please edit your question with the error detail vs. placing in comments. – Jay Walker Mar 06 '13 at 03:29
  • Your issue appears to be related to the C++ Standard Library used. Please see this answer for solving the issue: http://stackoverflow.com/questions/12665457/zxing-in-xcode-4-5-and-ios-6/12666175#12666175 – Till Mar 06 '13 at 03:31
  • ok, Thank you for ur suggestions Till, i will check it and then discuss with u. – maren iOS Mar 06 '13 at 03:39

1 Answers1

0

You are most likely linking against the "wrong" C++ Standard Library in your project. All projects / libraries involved for building have to use the same C++ Standard Library.

For more details and for correcting the issue, see this answer.

Community
  • 1
  • 1
Till
  • 27,559
  • 13
  • 88
  • 122