August 25th, 2012, 12:50 AM
Xcode Error using C++ command
Stuck using xCode here until I can find a PC to mess around on Visual with. In any case, I've been getting along just fine, but the last two things I tried I've been getting this error here:
0x7fff8fe166cd: movdqa %xmm0, 64(%rsp) Thread 1: EXC_BAD_ACCESS (code=13, address=0x0)
0x7fff8fe166d3: movdqa %xmm1, 80(%rsp)
0x7fff8fe166d9: movdqa %xmm2, 96(%rsp)
0x7fff8fe166df: movdqa %xmm3, 112(%rsp)
0x7fff8fe166e5: movdqa %xmm4, 128(%rsp)
0x7fff8fe166ee: movdqa %xmm5, 144(%rsp)
0x7fff8fe166f7: movdqa %xmm6, 160(%rsp)
0x7fff8fe16700: movdqa %xmm7, 176(%rsp)
My project looks like this:
// input and output example
using namespace std;
int main ()
cout << "Please enter an integer value: ";
cin >> i;
cout << "The value you entered is " << i;
cout << "and its double is " << i*2;
What happens is, I get as far as entering my integer in, and I make sure it's an integer within the correct range. After that, the thing fails.
Basic stuff really, brushing up / learning a bit... Can't seem to figure out what's going on, and google has left me with nothing really to go on. I read something about aligning the stack to be 16 byte aligned since I'm on a Mac using C++ in Xcode, but I have no idea how to go about something like that, or what it means.
Anyone familiar with this / have a solution? Thanks in advance.
Sorry, I don't know if it helps, but I'm using a MBP from Feb 2012 running on OSX Lion 10.7.4 and the version of Xcode is 4.4.1.
August 25th, 2012, 04:55 AM
Use code tags when you post code, please.
There's nothing wrong with the code as you've written it. It's got to be some sort of Xcode installation problem.
I'm on the same version (older MBP), I'll see if I can reproduce. Don't usually use Xcode.
ETA: Nope, works OK for me.
Last edited by ptr2void; August 25th, 2012 at 05:01 AM.
I ♥ ManiacDan & requinix
This is a sig, and not necessarily
a comment on the OP:
don't be a help vampire
August 25th, 2012, 07:52 AM
Sorry about that, will do for the future.
Hmm alright. Is there a better program to code with C++ on a Mac? In any case, I guess I'll keep trying different things to see if I can't figure it out.
If any one else has any idea, let me know! Thanks again.