Xcode Leaks - Failed to attach to target process

Viewed 643

I am trying to profile a C/C++ app in Xcode. I pressed Command + I for profiling, chose Leaks and then hit the record button. However, I receive this error:

Failed to attach to target process

Failed to execute loader thread for /Applications/Xcode.app/Contents/SharedFrameworks/DVTInstrumentsFoundation.framework/Resources/liboainject.dylib in target; target process <pid> likely exited
1 Answers

check definition of your main function,use

int main(int argc, const char *argv[])

instead of

int main()
Related