boost-xcode5-iosx
boost-xcode5-iosx copied to clipboard
Undefined Symbols for architecture
Hey,
I am using xcode 5.1.1 and trying to deploy to an ios 7.1 device and am on a mac.
I was trying to use your script to build boost for my ios project but I ran into a little problem. I included the framework and followed all of your instructions as well as looked at the code examples and downloaded the vendor.tar so I was sure there wouldn't be a problem with me building the framework.
I opened the boost-xcode5-demo in xcode, linked to the boost framework that I mentioned above and built it under one of the simulators. It worked and I was happy but then I selected "iOS Device" and then I get the typical undefined symbols for architecture arm7s. I am familiar with this problem relating to the framework itself not being built properly. So I was wondering if you know what is wrong.
Thanks,
PS. Here is a snippet of the error
Undefined symbols for architecture armv7s:
"boost::atomics::detail::lockpool::get_lock_for(void const volatile*)", referenced from:
boost::thread_detail::enter_once_region(boost::once_flag&) in boost(libboost_thread_once.o)
boost::thread_detail::commit_once_region(boost::once_flag&) in boost(libboost_thread_once.o)
boost::thread_detail::rollback_once_region(boost::once_flag&) in boost(libboost_thread_once.o)
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Hi.
First, I have just noticed that there was an absolute path for header search paths in Xcode project. Not sure if it matters, but I fixed it and just pushed a change to demo project.
From the looks of it, the slice for armv7s
architecture is missing from the framework you use.
Since it is a demo project, there chances are high that I just missed something and didn't build it properly, or forgot to include proper files in vendor.zip
or something else.
Can you run the following command and see what happens?
file vendor/ios/boost.framework/boost
The output should look like
boost.framework/boost: Mach-O universal binary with 5 architectures
boost.framework/boost (for architecture armv7): current ar archive random library
boost.framework/boost (for architecture armv7s): current ar archive random library
boost.framework/boost (for architecture i386): current ar archive random library
boost.framework/boost (for architecture x86_64): current ar archive random library
boost.framework/boost (for architecture cputype (16777228) cpusubtype (0)): current ar archive random library
If you don't have the line with "armv7s" then this is your problem.
Also what do you mean when you say "linked to the boost framework that I mentioned above"?
You shouldn't have to link anything manually and modify Xcode project file to make it work.
All you need to do is overwrite vendor
folder with the contents of the zip file.
Hope it helps.
Hey,
Ya I just ran the file command and got
vendor/ios/boost.framework/boost: Mach-O universal binary with 5 architectures
vendor/ios/boost.framework/boost (for architecture armv7): current ar archive random library
vendor/ios/boost.framework/boost (for architecture armv7s): current ar archive random library
vendor/ios/boost.framework/boost (for architecture i386): current ar archive random library
vendor/ios/boost.framework/boost (for architecture x86_64): current ar archive random library
vendor/ios/boost.framework/boost (for architecture cputype (16777228) cpusubtype (0)): current ar archive random library
So it looks good but I still got the error that I reported above when building the demo project.
Ya sorry, I didn't mean to say linked, I am not doing anything extra except downloading the vendor zip and using the boost.framework there in the project so it could work.
Still does not build, it seems like it should work based on that it obviously has that architecture, but I am not totally sure. Hope you can help.
Thanks