C++ linking problems, seems like I can't link against standard C++ stuff

亡梦爱人 提交于 2019-11-30 17:09:17
D.C.

Thank you everyone for your answers. I found out what my particular problem was, so will share it here in case anybody else hits it.

My problem was a project build setting. Under "Apple LLVM Compiler 5.0 - Language - C++" there is a setting for "C++ standard library". Its value needed to be changed to "Compiler Default".

Several hours wasted, but problem solved!

I am using a newer version of the iOS SDK and set "Build Settings > Apple LLVM 5.0 - Language - C++ > C++ standard library" to "Compiler Default" but got 46 compile errors.

I got rid of the errors by setting it to "libstdc++ (GNU C++ standard library)".

Hopefully this helps anyone who got stuck when using "Compiler Default".

Not sure if this will help anyone, but I had the same problem when I had a project linked with other projects when one had Base SDK as 5.1 and the other had Base SDK of 7.0.

Maybe you do not have SDK for armv7 architecture, so you can compile your code but standard C++ stuff that installed on your computer is for another architecture (for example x86) and your linker can't find libraries that required for this architecture

The link error suggests that the c++ library cannot be found in the path. Without further information, I would suggest checking the path to the c++ library is correct.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!