my code was working well with sdk 4.2 but while upgrading the sdk and the xcode to 4 it raise error apple mach-o error
and this is its details
bad codegen, pointer diff in itk::ProcessAborted::ProcessAborted(char const*, unsigned int)to global weak symbol vtable for 开发者_开发问答itk::ProcessAbortedfor architecture armv7 collect2: ld returned 1 exit status Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 failed with exit code 1
any suggestion to solve this issue ,
itk is a library I built using xcode and g++4.2
Have you tried a complete clean and re-build of the project? Xcode 4 uses LLVM as its default compiler, not g++. If you have part of the project -- or old object files -- kicking around from a g++ build, I could imagine that you might well run into trouble...
Try File > Workspace Settings ( or Project Settings ) and enter the following settings:
- Derived Data (index, logs, build) Location
- Custom > Workspace-relative path > 'DerivedData'
- Build Location
- Place build products in derived data location
- Custom Subfolder
- Place build products in derived data location
This worked for me as my nested projects/libraries we not getting linked properly.
I had to deal with the same problem and finally found a solution:
In Build settings, ensure that "C/C++ Compiler Version" is set to "GCC 4.2" and "Symbols Hidden by Default" is set to "YES"
Then search for "Optimization Level" and change it to "None [-O0]"
If it doesn't work, look at the build settings of your target and check that the same options/values are set
精彩评论